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

[Solved] Grid rows disappear after add/edit

1 Answer 156 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 1
Tim asked on 29 May 2008, 09:43 PM
Why do the rows disappear after an edit, add, or refresh action?

 The Grid is populated in Codebehind from database with four rows.  I can even add an "edit row" in the grid pre_render event. 

this.RadGrid1.MasterTableView.Items[1].Edit = true; this.RadGrid1.MasterTableView.Rebind();

However, every time I try to edit an exisitng row, the postback does not keep the row's state.

So, what property am I not setting?

Thanks

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 30 May 2008, 04:27 AM
Hi Tim,

Try the following code snippet in the UpdateCommand event to retain the Ediform open on clicking the UpdateButton.

CS:
 protected void RadGrid1_UpdateCommand(object source, GridCommandEventArgs e)  
    {  
        e.Canceled = true;  
         //...
    } 

Thanks
Princy.
Tags
Grid
Asked by
Tim
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or