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

Get column position in view

2 Answers 115 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Gary
Top achievements
Rank 1
Gary asked on 10 Jun 2009, 04:54 PM
If I have a reference to a column, how can I retreive it's display index in the view (as it may have been moved by the user).

2 Answers, 1 is accepted

Sort by
0
Accepted
Pavel Pavlov
Telerik team
answered on 12 Jun 2009, 02:32 PM
Hello Gary,

You may iterate through the RadGridView.TableDefinition.FieldDescriptors collection and find your column by UniqueName.

The FieldDescriptors collection has its items arranged according to the display order of the columns.


All the best,
Pavel Pavlov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Gary
Top achievements
Rank 1
answered on 12 Jun 2009, 03:49 PM
That's what I needed...thanks.
Tags
GridView
Asked by
Gary
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Gary
Top achievements
Rank 1
Share this question
or