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

Column Resize is not maintained on Postback for child grid in hierarchy

1 Answer 61 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Saurabh
Top achievements
Rank 1
Saurabh asked on 22 Dec 2010, 11:37 AM

Hi,

I have hierarchical grid on which i have included the column resize functionality. Column re-sizing done by user on Parent grid is maintained even after the post back but column re-sizing done by user on child grid is not maintained after the postback. I am using telerik verison "2010.1.519.35". Below i have pasted my sample code where ----//Some Code---- is for some code which i have not pasted here.

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="Mygrid">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="Mygrid" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                   </AjaxSettings>
            </telerik:RadAjaxManager>
                <telerik:RadGrid ID="Mygrid" runat="server" AllowCustomPaging="True" AllowPaging="True" PageSize="5" EnableEmbeddedSkins="false" Skin="MySkin" AllowSorting="True" AllowMultiRowSelection="true" AllowFilteringByColumn="true" EnableViewState="true" GridLines="None" Width="100%" ----//Some Code---->
                    <ClientSettings AllowExpandCollapse="true"><Resizing AllowColumnResize="true" ResizeGridOnColumnResize="true" ClipCellContentOnResize="true" EnableRealTimeResize="true" /><Selecting AllowRowSelect="true" EnableDragToSelectRows="false" /></ClientSettings>
                    <PagerStyle Position="TopAndBottom" Mode="NumericPages" PageButtonCount="5" />
                    <SortingSettings EnableSkinSortStyles="false" />
                    <MasterTableView AllowSorting="true" AllowMultiColumnSorting="false" HierarchyLoadMode="ServerOnDemand" Width="100%" TableLayout="Fixed">
                        <PagerTemplate>
                             ----//Some Code----
                        </PagerTemplate>
                        <ExpandCollapseColumn ButtonType="ImageButton" CollapseImageUrl="~/Skin/Grid/SingleMinus.gif"  ExpandImageUrl="~/Skin/Grid/SinglePlus.gif" ></ExpandCollapseColumn>
                        <RowIndicatorColumn Visible="False"><HeaderStyle /></RowIndicatorColumn>
                        <DetailTables>
                            <telerik:GridTableView HierarchyLoadMode="Client" Width="100%" GridLines="None"  runat="server" CellPadding="0" CellSpacing="0" BorderWidth="1" BorderColor="#cccccc" AllowMultiColumnSorting="false" AllowPaging="false" AllowSorting="false" HierarchyDefaultExpanded="true" EnableViewState="true" AllowFilteringByColumn="false" TableLayout="Fixed"  ----//Some Code---->
                                <ParentTableRelation><telerik:GridRelationFields  ----//Some Code---- /></ParentTableRelation>
                                <Columns>
                                    <telerik:GridClientSelectColumn UniqueName="colselectjob" Resizable="false"><HeaderStyle Width="25" /></telerik:GridClientSelectColumn>
                                     ----//Some Code----
                                </Columns>
                            </telerik:GridTableView>
                            
                        </DetailTables>
                        
                        <Columns>
                            <telerik:GridClientSelectColumn Resizable="false" UniqueName="colselectjob"><HeaderStyle Width="25" /></telerik:GridClientSelectColumn>
                            ----//Some Code----
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>


1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 27 Dec 2010, 01:58 PM
Hi Saurabh,

Indeed, the resizing for the detail tables is not persisted on postback. You can try maintaining it manually, or create the hierarchy with NestedViewTemplate and place another RadGrid in it.

Kind regards,
Iana
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Grid
Asked by
Saurabh
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or