Telerik RadGrid inside of ToolTip inside of RadGrid

Posted by lowerkey on Stack Overflow See other posts from Stack Overflow or by lowerkey
Published on 2010-09-13T23:30:12Z Indexed on 2012/06/13 4:40 UTC
Read the original article Hit count: 2712

Filed under:
|

Right now I have a RadToolTip inside of a RadGrid. The RadGrid displays a field from the datasource called "Value". The RadToolTip displays the same thing.

I want to add another RadGrid inside of the RadToolTip. The function setting up the datasource of that second RadGrid should take "Value" as a parameter?

How do I do that?

Here's what I have so far.

<h2>Currently Assigned Tags</h2>

<telerik:RadGrid runat="server" ID="grdTags" OnNeedDataSource="grdTags_NeedDataSource" AllowMultiRowSelection="true"
    AutoGenerateColumns="false" OnDeleteCommand="DeleteTag" Skin="CiscoGreen" EnableEmbeddedSkins="false">
    <ClientSettings>
        <Selecting AllowRowSelect="true" />
    </ClientSettings>
    <MasterTableView DataKeyNames="KeywordID">

        <Columns>

            <telerik:GridButtonColumn ButtonType="LinkButton" Text="Delete" CommandName="Delete" />
            <telerik:GridBoundColumn Visible="false" DataField="KeywordID" />
            <telerik:GridBoundColumn HeaderText="Value" DataField="Value" />

            <telerik:GridTemplateColumn UniqueName="ToolTip">
                <HeaderTemplate>
                    Related Campaigns
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label runat="server" ID="TargetLabel" Text='<%# DataBinder.Eval(Container.DataItem, "Value") %>' />
                    <telerik:RadToolTip ID="ttRelatedCampaigns" runat="server" Width="300px" Height="300px" TargetControlID="TargetLabel">
                        <%# DataBinder.Eval(Container.DataItem, "Value") %>
                        <telerik:RadGrid ID="grdRelatedCampaigns" runat="server" OnNeedDataSource='<%# DataBinder.Eval(Container.DataItem, "Value") %>' AutoGenerateColumns="false"
                            Skin="CiscoGreen" EnableEmbeddedSkins="false">
                            <MasterTableView DataKeyNames="InitiativeName">
                                <Columns>
                                    <telerik:GridBoundColumn HeaderText="Campaign Name" DataField="Value" />
                                </Columns>
                            </MasterTableView>    
                        </telerik:RadGrid>
                    </telerik:RadToolTip>
                </ItemTemplate>
            </telerik:GridTemplateColumn>

        </Columns>

    </MasterTableView>                
</telerik:RadGrid>

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about telerik