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

Popup window issue trying to display detail form

1 Answer 117 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 1
Joe asked on 30 Jun 2010, 07:26 PM
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(thisthis.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> 
 
 

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 06 Jul 2010, 07:35 AM
Hello Joe,

You can nest a template column in the master table, with an expand collapse command name:

http://www.telerik.com/help/aspnet-ajax/grdcommandreference.html

You can couple this with a hierarchical structure, to show any related data on the inner level.
I hope that this is a feasible approach for you.

Sincerely yours,
Yavor
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Joe
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or