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

Grid header is not reordering when Reorder

1 Answer 129 Views
Grid
This is a migrated thread and some comments may be shown as answers.
shiva
Top achievements
Rank 1
shiva asked on 28 Jan 2015, 07:39 AM
Hi Team,

I am using Telerik Ajax q1 2013 version.(2013.1.403.40)
For Column Reorder according to this link http://demos.telerik.com/aspnet-ajax/grid/examples/columns-rows/columns/column-row-resize-reorder/defaultcs.aspx
In Grid I have given code like this
<telerik:RadGrid ID="rdgd1" runat="server">
         <MasterTableView TableLayout="Fixed" >
            ........
         </MasterTableView>
           <ClientSettings AllowColumnsReorder="true" ReorderColumnsOnClient="true">
                   <Scrolling AllowScroll="True" UseStaticHeaders="true" SaveScrollPosition="True" ScrollHeight="240px"/>
                  <Resizing AllowRowResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="True" AllowColumnResize="True"/>
             </ClientSettings>
</telerik:RadGrid>
Columns Reorder is working fine but Column headers are not Moving/Reordering. Am i missing any thing here, Can you please resolve my issue asap.
Thanks in advance.




1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 30 Jan 2015, 09:57 AM
Hi Shiva,

I have tested your RadGrid settings with version 2013.1 403 and everything seems to work correctly on my end. Can you please test the following in a new project and see if you will be able to reorder the columns as expected:
<telerik:RadGrid ID="rdgd1" runat="server" OnNeedDataSource="rdgd1_NeedDataSource">
    <MasterTableView TableLayout="Fixed">
    </MasterTableView>
    <ClientSettings AllowColumnsReorder="true" ReorderColumnsOnClient="true">
        <Scrolling AllowScroll="True" UseStaticHeaders="true" SaveScrollPosition="True" ScrollHeight="240px" />
        <Resizing AllowRowResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="True" AllowColumnResize="True" />
    </ClientSettings>
</telerik:RadGrid>
 
And the dummy data:
protected void rdgd1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    DataTable table = new DataTable();
    table.Columns.Add("ID", typeof(int));
    table.Columns.Add("FirstName", typeof(string));
    table.Columns.Add("LastName", typeof(string));
    table.Columns.Add("Age", typeof(int));
    table.Columns.Add("Date", typeof(DateTime));
    table.Columns.Add("BoolValue", typeof(Boolean));
    for (int i = 0; i < 5; i++)
    {
        table.Rows.Add(i, "FirstName" + i, "LastName" + i, 20 + i, DateTime.Now.AddDays(i), i % 2 == 0);
    }
 
    (sender as RadGrid).DataSource = table;
}

As for your actual project, please inspect your browser's console and see if any JavaScript errors are thrown when you try to reorder the columns.


Regards,
Konstantin Dikov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
shiva
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or