Hi I have editable hierarchical Grid I get data from child grid with this way
for (int j = 0; j < this.SupplierListUltraWebGrid.Rows[i].Rows.Count;j++ ) { UltraGridRow gridRows = new UltraGridRow(); gridRows = SupplierListUltraWebGrid.Rows[i]; string idSupplier = gridRows.Rows[j].Cells.FromKey("SupplierName").Value.ToString();
string buyerName = gridRows.Rows[j].Cells.FromKey("BuyerName").Value == null ? "" : gridRows.Rows[j].Cells.FromKey("BuyerName").Value.ToString();
}
if i have 1 row in the child grid it work fine but the problem is when I have multiple rows in the child grid and the user edit cells, I always get data of the latest row changed and all others rows keep there old data?
thinks in advance for your helps
Regards
But how do you get the code to realize there have been changes made in the child row? The rows collection always allows access to the top level set of rows in UpdateRowBatch. Supposedly, the top level rows are supposed to allow access to the child rows, but I'm not sure what the code is to do this. I have updates in cells of both my parent and child rows and I want to use UpdateRowBatch. I am also using an ultrawebgrid.
I'm not entirely certain what you're trying to do here. All I see is that you're getting two values (idSupplier and buyerName) that both go out-of-scope as the loop completes each time. I'm assuming there's additional code that you haven't posted here, where you're actually using those values for something.
If you're trying to respond to the user updating values in the grid, you should probably use the UpdateRow or UpdateRowBatch events, rather than looping through all the rows in the grid. Both of these events give you a reference to the row that was edited (e.Row).