Check ItemCommand for DetailTable

2 posts, 0 answers
  1. Tina
    Tina avatar
    130 posts
    Member since:
    Jul 2011

    Posted 28 Jun 2012 Link to this post

    How can I check InsertCommand name is fired for detailtableviw?
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 28 Jun 2012 Link to this post

    Hi Tina,

    Try the following code snippet  for checking whether InsertCommand name is fired for DetailTableview.

    ASPX:
    <DetailTables>
       <telerik:GridTableView Name="Detail" >
        . . .

    C#:
    protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
    {
      if (e.CommandName == RadGrid.InitInsertCommandName && e.Item.OwnerTableView.Name == "Detail")
      {
        //your code for insertion
      
    }

    Thanks,
    Princy.
Back to Top