I'm hoping that someone can help me. I have a radgrid with a Add New Sales Opportunity button on the command bar at the top of the MasterTableView. When clicked the ItemCreated event is fired. I have a JavaScript alert that asks if the user wants to create another record after they have saved their first. I am using a HiddenField on the user control to send the response back to the server side. What I need to do is raise the ItemCreated event in the code behind to open a new add form if the user options to create a new record.
Here's a snippet of how my grid is created in the user control:
<telerik:RadGrid runat="server" ID="grdSalesOpportunity" CssClass="grdSalesOpportunityClass" AllowPaging="True" AllowCustomPaging="true"
AutoGenerateColumns="false" EnableLinqExpressions="false"
AllowSorting="true" GridLines="Both" OnNeedDataSource="grdSalesOpportunity_NeedDataSource" CommandItemStyle-CssClass="swrap"
OnItemDataBound="grdSalesOpportunity_ItemDataBound"
NonExportingColumns="EditCommandColumn,DeleteColumn,AddNotes" ShowAllExportButtons="false"
OnSortCommand="grdSalesOpportunity_SortCommand" OnPageSizeChanged="grdSalesOpportunity_PageSizeChanged"
OnUpdateCommand="grdSalesOpportunity_UpdateCommand" OnInsertCommand="grdSalesOpportunity_InsertCommand"
OnItemCommand="grdSalesOpportunity_ItemCommand" OnItemCreated="grdSalesOpportunity_ItemCreated" ShowExtraButtons="true">
<ClientSettings Scrolling-AllowScroll="true" Scrolling-UseStaticHeaders="true"></ClientSettings>
<GroupingSettings CaseSensitive="false" />
<ExportSettings ExportOnlyData="True" IgnorePaging="True" OpenInNewWindow="True"
Pdf-PageWidth="350mm" Pdf-PageHeight="210mm" Pdf-PageLeftMargin="20mm" Pdf-PageRightMargin="20mm">
</ExportSettings>
<MasterTableView CommandItemDisplay="Top" DataKeyNames="SOID" AllowFilteringByColumn="true"
ClientDataKeyNames="SOID">
<CommandItemSettings ShowAddNewRecordButton="true" AddNewRecordText="Add New Sales Opportunity"
ShowExportToCsvButton="true" ShowExportToExcelButton="true" ShowExportToPdfButton="true"
ShowExportToWordButton="false" />