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

Creating two insert commands

1 Answer 58 Views
Grid
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 20 Jun 2013, 07:43 AM
Hi, 
   On a radgrid I would like to create two item command buttons that cause the insert form to create. I need to be able to distinguish between which one was clicked in the itemcreated event though. 

Can I somehow make the radgrid go into insert mode from the itemcommand event? The command names would be InsertChild & InsertAdult.

The reason for this is I want to load a different form into the insert depending on the button clicked. 

1 Answer, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 20 Jun 2013, 08:08 AM
just figured it out 

switch (e.CommandName)
{
    case "InsertAdult":
        rdgAssessments.MasterTableView.InsertItem("AdultInsert");
        rdgAssessments.Rebind();
        break;
    case "InsertChild":
        rdgAssessments.MasterTableView.InsertItem("ChildInsert");
        rdgAssessments.Rebind();
        break;
 
}

Thanks 

David 
Tags
Grid
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Share this question
or