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

Cancel insert when in edit mode

3 Answers 341 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jocelyn
Top achievements
Rank 1
Jocelyn asked on 20 Feb 2012, 02:44 PM
Hi,

I have a grid with edit column button. What I want is when I am in edit mode and the user click on insert button in the grid, I want the editItem to be canceled and then the insert form to be show. So the user can't have an item in EditMode and being in InsertMode at the same time.

Thanks.

3 Answers, 1 is accepted

Sort by
0
Accepted
Pavlina
Telerik team
answered on 20 Feb 2012, 10:17 PM
Hello,

I believe that the help article below will help you achieve your goal:
http://www.telerik.com/help/aspnet-ajax/grid-switching-insert-add-modes.html

Kind regards,
Pavlina
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Accepted
RvdGrint
Top achievements
Rank 1
answered on 21 Feb 2012, 10:34 AM
Jocelyn,

try this:
protected void rgRadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
{
switch (e.CommandName)
{
case RadGrid.InitInsertCommandName:
{
rgRadGrid1.MasterTableView.ClearEditItems();
}
}
}

Regards, 
  Jos Meerkerk
0
Jocelyn
Top achievements
Rank 1
answered on 21 Feb 2012, 02:49 PM
Thank you, this is what I was looking for!
Tags
Grid
Asked by
Jocelyn
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
RvdGrint
Top achievements
Rank 1
Jocelyn
Top achievements
Rank 1
Share this question
or