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

Controlling column reorder

2 Answers 39 Views
GridView
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 27 Mar 2011, 03:09 PM
Hi,
Is there any way to control which column can be placed before / after which column?
for example - i have six columns and i want to enable the user to reorder a column from the first 3 columns only between the first 3 columns and a column from the last 3 columns to be ordered only between the last 3 columns.

(i've attached a pic that probably will explain my question better)

I hope my question make sense and please forgive my english :)

Thanks!

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimitrina
Telerik team
answered on 28 Mar 2011, 12:41 PM
Hello James,

You can control the reordering of the RadGridView columns by using the event ColumnReordering.
After you have attached it to the grid, in the code behind you can add your custom logic. I have prepared a sample for you, where you can see how it is working for 4 columns - the same logic can be applied for 6 columns as it is in your case. 

Kind regards,
Dimitrina
the Telerik team
0
James
Top achievements
Rank 1
answered on 28 Mar 2011, 01:10 PM
Great, thanks.
Is there a way to do it fancier like the Row drag and drop example - using behaviors and styling?
I want to show an indicator if you can or can not drop the column.

Thanks.
Tags
GridView
Asked by
James
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
James
Top achievements
Rank 1
Share this question
or