I want to save screen1 grid values to screen2 grid.
I have created a Dataview in screen2. I’m unable to save records into DB.
Sample code:
//DataView creation
public SelectFrom < TestFSSOLine >.View TestFSSOLineGridView;
// copying the lines from screen1 grid to screen2 grid.
foreach (TestFSSOTemplateLine line in lines)
{
TestFSSOLine templateLine = new TestFSSOLine();
templateLine.LineNbr = line.LineNbr;
templateLine.SMEquipmentID = line.SMEquipmentID;
templateLine.InventoryID = line.InventoryID;
templateLine.Description = line.Description;
templateLine.Qty = line.Qty;
I have tried the below to save data into DB.
but nothing got worked for me.
//TestFSSOLineGridView.Cache.Update(templateLine);
//TestFSSOLineGridView.Update(templateLine);
//TestFSSOLineGridView.Cache.Insert(templateLine);
//TestFSSOLineGridView.View.AllowInsert = true;
//TestFSSOLineGridView.Cache.Update(templateLine);
//TestFSSOLineGridView.Insert(templateLine);
//TestFSSOLineGridView.Cache.Persisted(true);
}
Note: I have tried with cache clear also before updating the DataView
like: TestFSSOLineGridView.Cache.Clear();
TestFSSOLineGridView.Cache.ClearQueryCache();
TestFSSOLineGridView.Cache.ClearQueryCacheObsolete();
Could you please help me on this?
Thanks in Advance.
Shahidavali Syed..