Hi,
I have an issue with Teleric Grid Column Hiding.
The Grid(with Item templates) Looks perfect when it populated with data.
Once we are trying to hide few columns ( on Right click column Head + uncheck column names to hide) - The grid is not fitting to previous width ( or we can say 100% if assigned width ) - Its jst leaning towards left side with around 50% of the actual width.
I want the the grid to stretch (though some of the columns are hidden),so that it maintains the previous width.
Please note that the grid has Item templates.The reason for specifying this is,this issue is not seen in the grid without item template.
Please find my sample code below:
<telerik:RadGrid runat="server" ID="rg1" AllowCustomPaging="true"
AllowMultiRowEdit="false" AllowPaging="true" AllowSorting="true" GridLines="Vertical"
OnSortCommand="rg1_SortCommand" OnNeedDataSource="rg1_NeedDataSource"
OnPageIndexChanged="rg1_PageIndexChanged" OnPageSizeChanged="rg1_PageSizeChanged"
OnItemCreated="rg1_ItemCreated" RegisterWithScriptManager="true"
EnableHeaderContextMenu="true" Skin="Vista" OnGroupsChanging="rg1_GroupChanging" >
<ExportSettings HideStructureColumns="true">
<Csv ColumnDelimiter="Comma" RowDelimiter="NewLine" />
</ExportSettings>
<SortingSettings EnableSkinSortStyles="false" />
<MasterTableView DataKeyNames="Id" ClientDataKeyNames="Id" AutoGenerateColumns="false"
EnableHeaderContextMenu="true" TableLayout="Fixed" AllowCustomSorting="true" >
<Columns>
<telerik:GridBoundColumn DataField="StudID" HeaderText="student ID" SortExpression=" StudID "
EmptyDataText=" " HeaderStyle-Width="9%" />
<telerik:GridTemplateColumn UniqueName="Score" HeaderText=" Score " DataField="Score"
SortExpression="Score" HeaderStyle-Width="3%" >
<ItemTemplate>
<asp:Label ID="lbl Score " runat="server" Text=""></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="Fav " HeaderText="Fav " DataField="Fav "
SortExpression="Fav " HeaderStyle-Width="6%" >
<ItemTemplate>
<asp:CheckBox ID="chkFav " Checked="<%#Bind('Favorite') %>" AutoPostBack="true" runat="server"
OnCheckedChanged="chkFav _CheckChanged" />
<asp:Label ID="lblFav " runat="server" Text=""></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
<PagerStyle Mode="NextPrevNumericAndAdvanced" AlwaysVisible="true"></PagerStyle>
</MasterTableView>
<ClientSettings AllowColumnsReorder="true" ReorderColumnsOnClient="true" EnableRowHoverStyle="true">
<Scrolling AllowScroll="false" SaveScrollPosition="true" UseStaticHeaders="true" />
<Resizing AllowColumnResize="true" EnableRealTimeResize="true" ResizeGridOnColumnResize="true"
ClipCellContentOnResize="true" AllowResizeToFit="true" />
<Selecting AllowRowSelect="true" />
<ClientEvents OnGridCreated="gridCreated" OnRowDblClick="RowDblClick" />
</ClientSettings>
<HeaderContextMenu EnableScreenBoundaryDetection="true" EnableAutoScroll="true" />
<HeaderStyle Width="100px" />
</telerik:RadGrid>
Can you please help us solving this issue.
Thanks in Advance.
Dilip.