Hi,
I'm having an issue trying to get multiple events to fire within a RadGrid.
What I'm trying to accomplish:
1. I have a summary grid page with 5 out of 15 fields displaying in the grid. I have set the editing to be inline since I only have a few items
2. I have a column with an image that by clicking the image the detail form with all 15 fields will display allowing the user to modify the detail form
How can this be accomplished?:
Thanks,
Here is my code - base:
C# Code for the grid item command:
protected void dbgPolicyInformation_ItemCommand(object source, GridCommandEventArgs e) |
{ |
if (null != e.Item) |
{ |
switch (e.CommandName) |
{ |
case "Navigate": |
string popupScript = "<script language='javascript'>" + "window.open('/vpcleads/vpcpolicies/vpcpolicyinformation.aspx', 'CustomPopUp', " + "'width=350, height=350, menubar=yes, resizable=no')" + "</script>"; |
ScriptManager.RegisterStartupScript(this, this.GetType(), "PopupScript", popupScript,false); |
break; |
} |
} |
} |
HTML Code
RAD WINDOW MANAGER: |
<telerik:RadWindowManager Behaviors="Close" runat="server" ID="AddPolicy" Opacity="90" |
ShowContentDuringLoad="true" KeepInScreenBounds="true" VisibleStatusbar="false" |
Modal="true" Width="500px" Height="700px" Skin="Office2007"> |
</telerik:RadWindowManager> |
GRID OBJECT: |
<telerik:RadGrid ID="dbgPolicyInformation" runat="server" AutoGenerateColumns="false" |
OnNeedDataSource="dbgPolicyInformation_NeedDataSource" OnItemDataBound="dbgPolicyInformation_ItemDataBound" |
OnInsertCommand="dbgPolicyInformation_InsertCommand" OnDeleteCommand="dbgPolicyInformation_DeleteCommand" |
OnUpdateCommand="dbgPolicyInformation_UpdateCommand" OnCancelCommand="dbgPolicyInformation_CancelCommand" |
OnItemCreated="dbgPolicyInformation_ItemCreated" Skin="Office2007" ShowFooter="true" |
OnItemCommand="dbgPolicyInformation_ItemCommand"> |
<MasterTableView Name="Policy" DataKeyNames="PolicyId,NewPolicyId" EditMode="InPlace" |
CommandItemDisplay="Top" AllowMultiColumnSorting="True" CommandItemSettings-AddNewRecordText=""> |
<Columns> |
<telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Navigate" HeaderText="View Policy Details" |
Resizable="false" Reorderable="false" UniqueName="GoToLeadDetails" ImageUrl="~/Images/preview.gif" |
Text="View Policy Details" ButtonCssClass="pointerMouseCursor" Groupable="false"> |
<HeaderStyle Width="45px" HorizontalAlign="Center" /> |
<ItemStyle Width="45px" HorizontalAlign="Center" /> |
</telerik:GridButtonColumn> |
<telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn1" |
HeaderText="Quick Edit"> |
<HeaderStyle Width="20px" /> |
<ItemStyle CssClass="MyImageButton" /> |
</telerik:GridEditCommandColumn> |
<telerik:GridBoundColumn DataField="PolicyId" HeaderText="PolicyId" Visible="false"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="RenewalDate" HeaderText="Renewal Date"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="CompanyName" HeaderText="Company Name"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="PolicyNumber" HeaderText="Policy"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="MarketingSourceDesc" HeaderText="Marketing Source"> |
</telerik:GridBoundColumn> |
<telerik:GridButtonColumn ConfirmText="Delete This Policy?" ButtonType="ImageButton" |
CommandName="Delete" Text="Delete Policy" UniqueName="DeleteColumn1"> |
<HeaderStyle Width="20px" /> |
<ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" /> |
</telerik:GridButtonColumn> |
</Columns> |
</MasterTableView> |
</telerik:RadGrid> |