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

ArgumentOutOfRangeException when working with DisplayIndex

3 Answers 472 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Vic
Top achievements
Rank 1
Iron
Vic asked on 28 May 2012, 04:03 PM
Hello,
I'm currently evaluating the RadGridView (2012_1_326) and am encountering a problem setting the DisplayIndex.  The documentation (http://www.telerik.com/help/wpf/gridview-columns-reordering-columns.html) illustrates a simple scenario setting the DisplayIndex property in xaml.  When I implement this same example, i get a runtime ArgumentOutOfRangeException {"DisplayIndex out of range! Column2\r\nParameter name: displayIndex"}. 

My intent is to eventually bind this property to a custom object containing display settings which will be used to persist the user's preferences.

Your help is appreciated

3 Answers, 1 is accepted

Sort by
0
Accepted
Vera
Telerik team
answered on 31 May 2012, 10:02 AM
Hello,

We were able to reproduce the issue on our side and a fix for it will be included in Q2 2012 expected next week. Unfortunately, you cannot bind the property to a custom object. A possible approach is to set its value by using an event.

Excuse us for the inconvenience. Your Telerik points have been updated accordingly.

All the best,
Vera
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Vic
Top achievements
Rank 1
Iron
answered on 19 Jun 2012, 11:47 PM
It's working in the new release.
Thanks for the fix!
0
Erik
Top achievements
Rank 1
answered on 21 Aug 2012, 09:28 PM
DataBinding the DisplayIndex seems to work in the latest version, as long as:
1. a FallbackValue is provided (I get an ArgumentOutOfRangeException otherwise). This FallbackValue has to be unique
2. Binding mode is set to TwoWay, otherwise the source is not updated
Tags
GridView
Asked by
Vic
Top achievements
Rank 1
Iron
Answers by
Vera
Telerik team
Vic
Top achievements
Rank 1
Iron
Erik
Top achievements
Rank 1
Share this question
or