This is a migrated thread and some comments may be shown as answers.

Edit mode stays after rebinding the datasource

2 Answers 33 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Web team
Top achievements
Rank 1
Web team asked on 29 Apr 2010, 11:01 AM
For example:
1. I put row(index) 1 in edit mode
2. page posts back and I rebind a new datasource
3. after postback row still expanded and in edit mode even.

I want to clear all the expanded and edit mode items after post back. 

I call this code from a button's onclick event:
 private void LoadGrid(Int64 p) 
        { 
            grd.Rebind(); 
            grd.DataSource = BL.GetAll(p); 
            grd.DataBind(); 
        } 

2 Answers, 1 is accepted

Sort by
0
Web team
Top achievements
Rank 1
answered on 29 Apr 2010, 11:09 AM
grd.MasterTableView.ClearEditItems(); do the trick
0
Jeremy
Top achievements
Rank 1
answered on 08 Jun 2011, 09:53 AM
Thank you!!!! That took me so long to find
Tags
Grid
Asked by
Web team
Top achievements
Rank 1
Answers by
Web team
Top achievements
Rank 1
Jeremy
Top achievements
Rank 1
Share this question
or