4 Answers, 1 is accepted
0
Hi Jorge, you can use Move function of grid Columns collection.
Reorder columns using column index:
Reorder columns using column instance and insert position:
I hope this helpful.
Regards,
Julian Benkov
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Reorder columns using column index:
| radGridView1.Columns.Move(2, 3); |
Reorder columns using column instance and insert position:
| radGridView1.Columns.Move(radGridView1.Columns["City"], radGridView1.Columns["Address"], InsertPosition.Before); |
I hope this helpful.
Regards,
Julian Benkov
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
superold
Top achievements
Rank 1
answered on 03 Aug 2007, 02:11 PM
Perfect.
thanks
/ j
thanks
/ j
0
superold
Top achievements
Rank 1
answered on 06 Aug 2007, 02:02 PM
Well, sort of perfect.
I tried to SuspendLayout and ResumeLayout on the grid but I had to set the Visibility of the grid instead to have an OK performance, since the columns are visually moved and removed.
Also when some of the columns are hidden I do not know how to reset the horizontal scrollbar to reflect the new width of the grid.
Thanks,
/ jorge
I tried to SuspendLayout and ResumeLayout on the grid but I had to set the Visibility of the grid instead to have an OK performance, since the columns are visually moved and removed.
Also when some of the columns are hidden I do not know how to reset the horizontal scrollbar to reflect the new width of the grid.
Thanks,
/ jorge
0
Hello j0rge,
Instead of using SuspendLayout and ResumeLayout, it is better to use:
The horizontal scroll should automatically resize. There is no need to take care of it.
Regards,
Evtim
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Instead of using SuspendLayout and ResumeLayout, it is better to use:
| (radGridView1.GridElement as GridTableElement).BeginUpdate(); |
| // your code goes here |
| (radGridView1.GridElement as GridTableElement).BeginUpdate(); |
The horizontal scroll should automatically resize. There is no need to take care of it.
Regards,
Evtim
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center