Hi, I have a radGrid with the "Add New" button on top, what I want to do, is to not show the Edit Form when I click on this button, I just want to catch this event with OnItemCommand and do some things there, without showing the EditForm on the RadGrid
radGrid:
thanks
protected void dtgPilot_OnItemCommand(object sender, GridCommandEventArgs e) { switch (Convert.ToString(e.CommandName)) { case "InitInsert": //Code here break; } } }radGrid:
<telerik:RadGrid runat="server" id="dtgPilot" AllowPaging="true" AutoGenerateColumns="false" OnItemCommand="dtgPilot_OnItemCommand" > <MasterTableView CommandItemDisplay="Top" DataKeyNames="Id" > <CommandItemSettings AddNewRecordText="Add New" ShowRefreshButton="false" /> <Columns> <telerik:GridNumericColumn DataField="Id" Visible="false" /> <telerik:GridBoundColumn DataField="PilotName" HeaderText="Name" /><telerik:GridBoundColumn DataField="LicenceNumber" HeaderText="License #" /> </Columns> </MasterTableView> </telerik:RadGrid>thanks