Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
571
Help with RowUpdating - Cannot get it to work
posted

Hi

I am battling to get my webdatagrid to edit rows properly using the AJAX functionality shown on the Infragistics demo sites. All I am trying to do is when a row is edited the RowUpdating event on the server is fired in the background and the update is made. Here is my problem.

I am using a custom list of data objects coming in from a WCF service so I cannot use the SQLDatasource. I also dont want to use the ObjectDatasource as I need to be able to finely control the WCF service based on certain configurations.

First I simply fetch the data from the service and create a list of these objects. I then bind these objects to the grid in the page load event. If I do this however the RowUpdating Event simply does not fire. The reason I have discovered is that when the AJAX call is made the Datasource property on the Grid is Nothing. I have no idea why this is.

So after reading around I discover that the datasource property is reset on each postback. So I store my list of Business objects in a Session variable an on each page load I rebind the grid to this session variable. Now the RowUpdating Event does fire and I am able to get the GridResponse from the server. However now the changes made on the grid are rolled back to the original values. I simply cannot seem to simple get the data to change.

I am sure I am missing something obvious here, any help would be appreciated.

Many Regards

Andrew