iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi
This code works fine in flat grid:
grd.GetChanges("Deleted")[i].Row.GetCell("<Column>").Value
But in Hierarchical Grid the following code doesn't work:
grd.Tables["<Table>"].GetChanges("Deleted")[i].Row.GetCell("<Column>").Value grd.Tables.<Table>.GetChanges("Deleted")[i].Row.GetCell("<Column>").Value
How can i get changes for each table in Hierarchical Grid?
Best regards
Michael
In hierarchical table, the code
grd.Tables["<Table>"].GetChanges("Deleted")[i].Row.GetCell("<Column>").Value
will work. Attached is the sample code for the HierarchicalGrid, the sample will print out all the modified key value when Accept All Changes is invoked.
Hi Glenn
Yes you are right but it doesn't work if <Column> is not visible.
That's my problem.
Invisible column will not be rendered, so it will not be accessible from client side function. However, we could use hidden data member property on a visble cell to hold the hidden column value. Here is a snippet to set the hidden column description value in the key column in the PrepareDateBindind server side event:
WebGrid1.RootTable.Columns.GetNamedItem("description").Visible = false;WebGrid1.RootTable.Columns.GetNamedItem("key").HiddenDataMember = "description";
During onAcceptAllChanges client side function you will need to access the cell element and retirve the description attribute:
var parentMod = grd.Tables["parent"].GetChanges("Modified");for (i = 0; i < parentMod.length; i++){ parentMod[i].Row.GetCell("key").CellElement.getAttribute("description");}
var DelChanges = grd.GetChanges("Deleted"); for (var i in DelChanges) { if (DelChanges[i].Row.GetCell("Dependencies").Value > 0) { if (DependenciesText.length > 0) MessageQuantity = 2; else MessageQuantity = 1; DependenciesText += "\n - " + DelChanges[i].Row.GetCell("CustomerID").Text + " | " + DelChanges[i].Row.GetCell("CompanyName").Text + " | " + DelChanges[i].Row.GetCell("ContactName").Text + " | " + DelChanges[i].Row.GetCell("ContactTitle").Text; DelChanges[i].Row.UndoChanges(); } }
Please try my sample.
Please have a look on my last post.
Sorry for the late reply, it seems in the WebGrid1_OnAcceptAllChanges client side event handler you are invoking this line:
grd.XmlHttp.Asynchronous = false;grd.Refresh(); grd.XmlHttp.Asynchronous = true;
Those lines will collapse the other group which will cause the issue, our suggestion is to move those line after the iteration of deleted row changes.
By moving those lines after the deleted row changes iteration the JS issue does not occur.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname