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

Columns order change does't update the columns collection

1 Answer 33 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tanguy Detroz
Top achievements
Rank 1
Tanguy Detroz asked on 11 Jun 2010, 09:47 AM
Hi,

I am using RadControls for Silverlight 2010 Q1 SP1.

I have a grid with auto generated column. My ultimate goal is to save the columns order after the user made change to it (by drag and drop). I saw on another forum that there is no column order event so I added the following one on my grid :

radGridViewControl.Columns.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(Columns_CollectionChanged); 

Problem 1 : This event is fired for each column when building the grid (normal) but it is never fired after manually reordering the columns by the user.

Problem 2 : After reordering my columns, I had a look to the collection radGridViewControl.Columns in the debugger and I can see that the order in that collection is exactly the same as before. The collection didn't changed.

It seems that manually reordering a column only affects the front-end. I cannot see in any variable where my columns order changed. Can you help me on this one please and provide me the way to save (where to look at) these columns order changes ?

Cheers,

1 Answer, 1 is accepted

Sort by
0
Yavor Georgiev
Telerik team
answered on 11 Jun 2010, 09:58 AM
Hello Tanguy Detroz,

 RadGridView's ColumnDisplayIndexChanged is fired when columns are reordered. The GridViewColumn.ColumnDisplayIndex contains the ordering index of the column.

Best wishes,
Yavor Georgiev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
Tanguy Detroz
Top achievements
Rank 1
Answers by
Yavor Georgiev
Telerik team
Share this question
or