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

exiting edit mode after insert/update

4 Answers 164 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Minh
Top achievements
Rank 1
Minh asked on 15 Aug 2011, 10:32 PM
Hi,

I'm using the code behind to perform insert/update/delete. a sample is as follows

 

 

protected void RadGrid1_InsertCommand(object sender, GridCommandEventArgs e)

 

{
//insert something here

 

}

after inserting, the grid stays within the edit mode. Please let me know of the setting to exit and refresh the grid....also to refresh the grid after deletion.


thanks,
Minh Bui

4 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 16 Aug 2011, 05:41 AM
Hello Minh,

I suppose this issue is occurring because you have set the AllowAutomaticInserts and AllowAutomaticUpdates to 'True'. You can set this when you are performing automatic data source operations.

Thanks,
Princy
0
Minh
Top achievements
Rank 1
answered on 16 Aug 2011, 08:56 PM
Hi,

I've removed the AllowAutomaticInserts and AllowAutomaticUpdates. The grid have exited nicely....Is there a code setting for it to automatically refresh so that the newly inserted and updated rows reflect?

thanks,
Minh Bui
0
Princy
Top achievements
Rank 2
answered on 17 Aug 2011, 05:28 AM
Hello Minh,

RadGrid will automatically refresh after Insert/Update operation if you are binding the grid using NeedDataSource event. Make sure that you use advanced data binding techniques.

Thanks,
Princy.
0
Jayesh Goyani
Top achievements
Rank 2
answered on 17 Aug 2011, 05:34 AM
Hello,

RadGrid automatically Rebind the DataSource.Please check below link for more detail.
Advanced Data Binding
Commands that invoke Rebind() implicitly

or

If you want to Rebind Grid with particular time-period then .
Grid / Client Binding


Thanks,
Jayesh Goyani
Tags
Grid
Asked by
Minh
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Minh
Top achievements
Rank 1
Jayesh Goyani
Top achievements
Rank 2
Share this question
or