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

Identify whether the grid is in insert or editmode

1 Answer 27 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alyssa
Top achievements
Rank 1
Alyssa asked on 16 Dec 2013, 12:32 PM
Hi 
how to identify if the grid is in insert or editmode for inplace edit in the ItemCreated event?

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 16 Dec 2013, 12:42 PM
Hi Alyssa,

Please try the following code snippet.

ASPX:
protected void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
  if ((e.Item is GridDataInsertItem) && e.Item.IsInEditMode)
  {
      //init insert operation triggered  
  }
  else if ((e.Item is GridEditableItem) && e.Item.IsInEditMode)
  {
      //edit operation triggered  
  }
}

Thanks,
Shinu
Tags
Grid
Asked by
Alyssa
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or