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

NedtedViewTemplate collapse

1 Answer 76 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Andrey
Top achievements
Rank 1
Andrey asked on 06 Jul 2011, 12:04 PM
Hello, i have a problem with collapsing NestedViewTemplate.
I have Grid with NedtedViewTemplate, when i expand an row everythink works fine, but collapsing not working.
If i click another row, the first is collapsing automaticaly, it`s imposible to expand two rows in one time, and also can`t collaps any row. Please help me with it.
Code below-

<telerik:RadGrid runat="server" ID="rgBase" OnNeedDataSource="rgBase_OnNeedDataSource" AutoGenerateColumns="false">

<MasterTableView EditMode="InPlace" AllowFilteringByColumn="true" ExpandCollapseColumn-Display="true" EnableViewState="false" AllowNaturalSort="false" AllowMultiColumnSorting="false" HierarchyLoadMode="ServerOnDemand" TableLayout="Fixed" Width="100%">

<NestedViewTemplate>

 

<asp:Label ID="lName" Text='<%# Eval("new_materialid") %>' runat="server" Visible="true"></asp:Label>

 

</NestedViewTemplate>

 

<Columns>

<telerik:GridTemplateColumn HeaderText="Column1" AllowFiltering="false" SortExpression="qty" UniqueName="qty" >

 

<ItemTemplate>

 

<asp:Label ID="lQTY" Text='<%# Eval("qty") %>' runat="server"></asp:Label>

 

</ItemTemplate>

 

<ItemStyle CssClass="gridItem" HorizontalAlign="Left" />

 

<HeaderStyle CssClass="gridHeader" Width="110" HorizontalAlign="Left"/>

 

</telerik:GridTemplateColumn>

<telerik:GridTemplateColumn HeaderText="Column2" AllowFiltering="false" UniqueName="remain" SortExpression="remain">

 

<ItemTemplate>  

 

<asp:Label ID="lRemain" Text='<%# Eval("remain") %>' runat="server"></asp:Label>

 

</ItemTemplate>

 

<ItemStyle CssClass="gridItem" Width="100" HorizontalAlign="Left" />

 

<HeaderStyle CssClass="gridHeader" Width="110" HorizontalAlign="Left"/>

 

</telerik:GridTemplateColumn>

</Columns>

</MasterTableView>

 

<SortingSettings EnableSkinSortStyles="false" />

<ClientSettings AllowColumnsReorder="true" ColumnsReorderMethod="Reorder" >

 

<Scrolling AllowScroll="true" SaveScrollPosition="True" UseStaticHeaders="false"></Scrolling>

 

<Resizing AllowColumnResize="true" ResizeGridOnColumnResize="false" EnableRealTimeResize="false" />

 

<Selecting AllowRowSelect="true" />

<ClientEvents/>

</ClientSettings>

<SelectedItemStyle

CssClass="gridSelectedItemStyle"/>

</telerik:RadGrid>

 

protected void rgBase_OnNeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)

 

{

 

 

string _id = Request["id"].ToString();

 

 

 

Guid entityID = new Guid(_id);

 

ReloadData(3, entityID);

}


1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 11 Jul 2011, 10:15 AM
Hi Andrey,

Can you confirm if the grid is ajaxified? If so, try disabling AJAX temporarily to confirm whether any exception is thrown (when a control is ajaxified, its exceptions come as javascript errors from the PageRequestManager). This is a common scenario when grid hierarchy or groups refuse to collapse/expand.

Kind regards,
Tsvetina
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Grid
Asked by
Andrey
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or