views:

1047

answers:

2

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.

A: 

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.

leppie
A: 

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
caveman_dick