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

Nested Items not created on first load

1 Answer 60 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Gregory
Top achievements
Rank 2
Gregory asked on 15 Oct 2015, 05:06 PM

Hello,

I have a radGrid where I create the columns dynamically (according to the settings of the user, they decide which column to view). I have have a NestedViewTemplate not created dynamically.

After the grid is loaded, I look at the structure of the html code of the grid and I do not see the invisible row corresponding to the nested template.

I am not sure if I should add something to relate the NestedViewTemplate when creating dynamically the columns?

<telerik:RadGrid ID="rgRate" runat="server" OnNeedDataSource="rgRate_NeedDataSource"
    OnItemDataBound="rgRate_ItemDataBound" OnItemCreated="rgRate_ItemCreated"            OnSortCommand="rgRate_SortCommand"
    OnItemCommand="rgRate_ItemCommand" Skin="Investor1" EnableEmbeddedSkins="false" ClientSettings-EnablePostBackOnRowClick="false"
    AllowSorting="true" AllowPaging="true" AutoGenerateColumns="false" AllowMultiRowSelection="false"
    PagerStyle-Mode="NumericPages" PagerStyle-AlwaysVisible="true" ShowFooter="false"
    MasterTableView-NoMasterRecordsText="No Records found." SortingSettings-EnableSkinSortStyles="true">
    <ExportSettings>
        <Csv ColumnDelimiter="Tab" RowDelimiter="NewLine" FileExtension="TXT" />
    </ExportSettings>
    <ClientSettings EnableRowHoverStyle="true" AllowColumnsReorder="false" EnablePostBackOnRowClick="false" >
        <Selecting AllowRowSelect="true" />
        <Resizing AllowColumnResize="false" EnableRealTimeResize="false" />
        <ClientEvents OnGridCreated="radGrid_onGridCreated"/>
    </ClientSettings>
    <MasterTableView ShowHeadersWhenNoRecords="true" TableLayout="fixed" Width="100%" ExpandCollapseColumn-Visible="false"
        AllowNaturalSort="false" DataKeyNames="key1, key2, ..."
        CommandItemDisplay="Top">
        <CommandItemTemplate>
.....
 
        </CommandItemTemplate>
        <NestedViewTemplate>
            <div>...</div>
 
        </NestedViewTemplate>
 
        <PagerTemplate>
            <div>
                ...
            </div>
        </PagerTemplate>
    </MasterTableView>
</telerik:RadGrid>

 

     Thank you

Gregory

1 Answer, 1 is accepted

Sort by
0
Gregory
Top achievements
Rank 2
answered on 15 Oct 2015, 06:14 PM

I just found out what I was missing. Simply:

<MasterTableView ... HierarchyLoadMode="Client" ... >

Tags
General Discussions
Asked by
Gregory
Top achievements
Rank 2
Answers by
Gregory
Top achievements
Rank 2
Share this question
or