I have an UltraWebGrid inside an WebAsyncRefreshPanel. The grid's ViewType is set to Hierarchical. Everything looks exactly the way I want it to, but is not updating the database. The grid is tied to a WebHierarchicalDataSource that is tied to two SQLDataSources (SQLDataSource_Parent and SQLDataSource_Child). None of the child fields are updatable, and there is only one field in the parent rows that is updatable...and it is a checkbox. When the box is checked, the refresh image appears and then disappears...but the SQL table is not getting updated. I have several other webgrid's that are updating fine, but they are all flat not hierarchical.
Can anyone please help me?
Hello,
There are few things to check for:
1) Do the SQL tables have Primary Key ? If yes, then please check if the insert and update queries are generated for the SQL DataSourcees.
2) Make sure the DataKeyField property of the WebGrid is populated with the Primary Key field of the SQL Table. Without this the application does not throw error message, but does not update the database either. The following link explains about this property:
http://help.infragistics.com/Help/NetAdvantage/ASPNET/2009.2/CLR3.5/html/Infragistics35.WebUI.UltraWebGrid.v9.2~Infragistics.WebUI.UltraWebGrid.UltraWebGrid~DataKeyField.html
3) In order to edit the grid cells, make sure the DisplayLayout.AllowUpdateDefault property is set to AllowUpdate.Yes. This property can be overridden for the bands. The following links shows more details about this:
http://help.infragistics.com/Help/NetAdvantage/ASPNET/2009.2/CLR3.5/html/Infragistics35.WebUI.UltraWebGrid.v9.2~Infragistics.WebUI.UltraWebGrid.UltraGridBand~AllowUpdate.html
Please let me know if you have any other questions.
Thanks,
Sarita