Question

I have a RadGrid bound to a LinqDataSource. The grid has auto generated Edit and Delete columns. It displays a simple table without any hierarchical organization.

I am taking the following steps.

Populate a RadGrid using a LinqDataSource

Click Edit on the last row of the grid

From another control on the page, update the linqdatasource and call rebind on the grid

The grid loses track of the current editing item, and opens a different item in edit mode

Please help.

Was it helpful?

Solution

If you rebind the datasource, everything will be reset. You will need to keep track of the current 'edit' item, and 're-activate' it after your rebound the datasource.

OTHER TIPS

Make sure that:

  1. All binding occcurs in the OnInit event (or after the button click is handled)
  2. Viewstate is not disabled for the grid
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top