I'm using the 11.2 ASP controls in VS2010 using the WebHierarchicalDataGrid control
I'm doing everything on the server side. I have a column with a button that is wired up to a click event. When I click the button I execute some SQL that updates a value in the current row.
How do I get the updated value to show up in the current row?
Seems like I should be able to tell the grid to do a refresh on the current row.
Thanks.
Brian.
Hello Brian,
Thank you for posting in our community. You need to rebind again the grid. Clear the data source of the GridView assign the updated data source.
I hope this helps.
For any further questions do not hesitate to contact me.
Sincerely,
Georgi Sashev
Developer Support Engineer
Infragistics, Inc.
http://ko.infragistics.com/support
Georgi,
I tried your suggestion. After executing the SQL update I call this code in the button click event.
WebHierarchicalDataGrid1.GridView.ClearDataSource();
WebHierarchicalDataGrid1.DataSourceID = "WebHierarchicalDataSource1";
However, this causes the second band I'm on to collapse and the user loses where they were in the hierarchy.
The closest thing I've been able to do is place the WebHierarchicalDataGrid into a UpdatePanel, then after the SQL update I set the text in the row to what I know the SQL update would do. Plus, I disable the button. But, this has some undesired side effects when the grid resorts.
I'm thinking that a better solution would be to programmatically set the values in the row instead of via the SQL update command. Would this be a better solution? If so, how can I set the value for the row in the click event?
Thanks,