Edit mode stays after rebinding the datasource

3 posts, 0 answers
  1. Web team
    Web team avatar
    57 posts
    Member since:
    Mar 2010

    Posted 29 Apr 2010 Link to this post

    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. Web team
    Web team avatar
    57 posts
    Member since:
    Mar 2010

    Posted 29 Apr 2010 Link to this post

    grd.MasterTableView.ClearEditItems(); do the trick
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jeremy
    Jeremy avatar
    96 posts
    Member since:
    Mar 2010

    Posted 08 Jun 2011 Link to this post

    Thank you!!!! That took me so long to find
Back to Top