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

[Solved] on reaordering columns they change their width

1 Answer 65 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Igor Ashmetkov
Top achievements
Rank 1
Igor Ashmetkov asked on 04 Mar 2013, 02:41 PM
     Hello,
I have a grid with the same parameters:

<table style="width:1024px">
<tr>
<td>
    <telerik:RadGrid ID="rgrSearchClients" runat="server" 
        CellSpacing="0" GridLines="None"  AllowPaging="True" 
        AllowCustomPaging="True" VirtualItemCount="10000"  PageSize="15"
        ShowStatusBar="True" onneeddatasource="RadGrid1_NeedDataSource" 
        Culture="ru-RU"  Visible="False" 
        EnableHeaderContextMenu="True" AutoGenerateColumns="false" 
        HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left" 
        AlternatingItemStyle-HorizontalAlign="Left" 
        onitemcommand="rgrSearchClients_ItemCommand" 
        >
        <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
            <Selecting AllowRowSelect="True" />
           <ClientEvents OnRowDblClick="RowDblClick"   />           
            <Resizing AllowColumnResize="True" ResizeGridOnColumnResize="true" />            
        </ClientSettings>

<AlternatingItemStyle HorizontalAlign="Left"></AlternatingItemStyle>

<MasterTableView NoMasterRecordsText="По вашему запросу ничего не найдено.">

    <Columns>
    <telerik:GridBoundColumn HeaderText="ID"  DataField="ID" 
            Groupable="False" Display="false">

        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn HeaderText="GID"  DataField="GID" 
            Groupable="False">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn HeaderText="SSCODE"  DataField="SSCODE" Groupable="False" >
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn HeaderText="ShortName"  
            DataField="SHORT_NAME" Groupable="False" >     
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn HeaderText="FullName"  
            DataField="FULL_NAME" Groupable="False" >
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn HeaderText="RegName" DataField="REG_NAME" 
            Groupable="False">
        </telerik:GridBoundColumn>       
       <telerik:GridBoundColumn HeaderText="Address" DataField="ADSRESS_MAIN" 
            Groupable="False" >
        </telerik:GridBoundColumn>
    </Columns>
</MasterTableView>

<HeaderStyle HorizontalAlign="Center"></HeaderStyle>

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

    <PagerStyle Mode="NumericPages" />

    </telerik:RadGrid>
</td>
</tr>
</table>


Everything works normally when I use built-in Visual Studio web server. But when I publish project to IIS, it`s work strange on reordering columns:
For example, I want to reordel Column2(width=100px) and Column5(width=200px). When I drag and drop Column5 before Column2, columns exchange possitions but Column5 have size 100px and Column2 have size 200px.   I try different combination of Grid properties, such as <MasterTable TableLayout="fixed",   fixed <Colunn... HeaderStyle-Width="100px", but nothing help me.

1 Answer, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 05 Mar 2013, 04:53 PM
Hello Igor,

Please review the answer provided in the official support ticket you have opened.

All the best,
Angel Petrov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Igor Ashmetkov
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Share this question
or