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

Resetting Insert/Edit Mode Programmatically

2 Answers 1016 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paolo
Top achievements
Rank 1
Paolo asked on 23 Dec 2008, 04:54 PM
Is there a way to cancel the Insert (Add New Record) or Edit mode programmatically?

I am binding the RadGrid based on what the user selects in a DropDown. However, if they click on "Add New Record" or Edit in the RadGrid, even after the RadGrid is re-databound, it still maintains its Insert/Edit State. I want to start on a clean slate (RadGrid is neither inserting or editing).

~P

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 24 Dec 2008, 04:42 AM
Hi Paolo,

Try the following code snippet to achieve the desired scenario.

1.To close the Edit form:
 
 CS:
  RadGrid1.MasterTableView.ClearEditItems(); 

2.To close the Insert from:
 
  CS:
 RadGrid1.MasterTableView.IsItemInserted = false


Shinu
0
Faraz
Top achievements
Rank 1
answered on 10 Jan 2014, 06:36 AM
Thanks Shinu for help.

Tags
Grid
Asked by
Paolo
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Faraz
Top achievements
Rank 1
Share this question
or