I have a Web Hierarchical Data Grid that i am populating from a SQL Server database using SQL Data source controls. Both the grid columns and bands are populating as they should with no issues. I am using grouping for the band columns.
My problem is that when I edit a band column cell. When I click in to the cell I can change the value but once the cell and row loses focus the value reverts back to the original value that was displayed and is stored in the database,
I don't have any code for the grid in the code behind other than some code in the PreRender event for the grid that updates a progress bar in one of the columns section of the grid.
When i make changes to columns in the parent part of the grid the changes are saved and i have no issues. The only problem is with the band column changes.
What am i missing?
Thank you in advance for your assistance
Hello Mike,
I’ve tried reproducing the issue you described, but on my side, everything seems to work as expected and once I edit a column inside the child band the value gets updated successfully.
Could you provide a sample that demonstrates the issue and steps to reproduce? Please feel free to use the sample I attached above as a base or provide your own sample.
Having a working sample on my side, which I can debug, is going to be very helpful in finding the root cause of this behavior.
Thank you for your cooperation.
Looking forward to hearing from you.
Regards, Ivan Kitanov
I am using CRUD and as i said the Parent part of the grid save its changes and this is only happening in the bands and i a have a DataKeyField defined and the corresponds to the primary key in the database.
I have tried to reproduce your issue with a small sample application that I am attaching below. On my side everything seems to work as expected and I am able to change the values of the cells when the grid is ungrouped and grouped as well, the cell values are updated and once the user changes the active row they are committed and the value of the progress bar is updated as well.
The first thing that comes to my mind is whether you are using Auto CRUD, if you do then the grid would handle the CRUD operation by itself you wouldn’t need to do anything else, otherwise you would have to handle the corresponding events for updating the grid data such as – RowAdded/RowAdding, RowUpdated/RowUpdating and RowDeleted/RowDeleting.
The other thing that you would need to check is if you have defined a DataKeyField for each of the band, which should correspond to the primary key of the table used for the band and DataMember property, that corresponds to the table name of the table represented by the band. Also, since I mentioned primary key in order to update a value the data source should have a primary key for both the parent band and all of the child bands.
Please check the above suggestions, test the sample attached and let me know if you need any further assistance.
5773.ProgressBarInsideCells.zip