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

Unhandled Exception 4004 (Q3 2011)

7 Answers 78 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 20 Dec 2011, 07:25 PM
Hello, after upgrading to Q3 2011 for silverlight I am seeing this unhandled exception:

Unhandled Exception 4004
ManagedRuntimeError
System.ArgumentOutOfRangeException: Index was out of range
Must be non-negative and less than the size of the collection

It appears to happen when opening a ChildWindow
Also happens when clicking on a tab folder.
We are using VS 2010 Silverlight etc.

Can someone help me diagnose and correct?
Nothing I do seems to help.

7 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 21 Dec 2011, 08:57 AM
Hi,

 Will you post the exception stack trace? 

Kind regards,
Vlad
the Telerik team

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

0
Chris
Top achievements
Rank 1
answered on 21 Dec 2011, 02:52 PM
I was able to resolve the issue by removing all DisplayIndex="xx" attributes from the XAML.
The first Display Index was always set to zero and then incremented up from there.

Did this break in Q3 2011?
0
Vlad
Telerik team
answered on 21 Dec 2011, 04:25 PM
Hello,

 We are not aware of any breaks related to DisplayIndex.

Best wishes,
Vlad
the Telerik team

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

0
Chris
Top achievements
Rank 1
answered on 21 Dec 2011, 04:27 PM
I am seeing unhandled exceptions when setting the DisplayIndex.
Can you correct the issue?
0
Vlad
Telerik team
answered on 21 Dec 2011, 04:29 PM
Hi,

 Can you post your grid/columns definitions and data-binding? 

Best wishes,
Vlad
the Telerik team

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

0
Chris
Top achievements
Rank 1
answered on 21 Dec 2011, 04:33 PM
If any grid has the display index values set like below the error occurs even if there is no data.

<telerik:RadGridView.Columns>
    <telerik:GridViewImageColumn Header="Priority" DisplayIndex="0" IsFilterable="False" IsGroupable="False" IsReadOnly="True" IsSortable="False" ShowDistinctFilters="False" UniqueName="PriorityImageName" DataMemberBinding="{Binding PriorityImageName}" />
    <telerik:GridViewDataColumn Header="Parameter Name" DisplayIndex="1" IsFilterable="true" IsGroupable="False" IsReadOnly="True" IsSortable="True" ShowDistinctFilters="True" UniqueName="Name" />
    <telerik:GridViewDataColumn Header="Identifier" DisplayIndex="2" IsFilterable="true" IsGroupable="False" IsReadOnly="True" IsSortable="True" ShowDistinctFilters="True" UniqueName="QualifierName" />
    <telerik:GridViewDataColumn Header="Units" DisplayIndex="3" IsFilterable="False" IsGroupable="False" IsReadOnly="True" IsSortable="False" ShowDistinctFilters="False" UniqueName="UOM.Abbreviation" />
    <telerik:GridViewDataColumn Header="Minimum" DisplayIndex="4" IsFilterable="False" IsGroupable="False" IsReadOnly="True" IsSortable="False" ShowDistinctFilters="False" UniqueName="Minimum" />
    <telerik:GridViewDataColumn Header="Typical" DisplayIndex="5" IsFilterable="False" IsGroupable="False" IsReadOnly="True" IsSortable="False" ShowDistinctFilters="False" UniqueName="Typical" />
    <telerik:GridViewDataColumn Header="Maximum" DisplayIndex="6" IsFilterable="False" IsGroupable="False" IsReadOnly="True" IsSortable="False" ShowDistinctFilters="False" UniqueName="Maximum" />
    <telerik:GridViewDataColumn Header="Op Cond" DisplayIndex="7" IsFilterable="False" IsGroupable="False" IsReadOnly="True" IsSortable="False" ShowDistinctFilters="False" UniqueName="OperatingCondition" />
    <telerik:GridViewImageColumn Header="Conditions" DisplayIndex="8" IsFilterable="False" IsGroupable="False" IsReadOnly="True" IsSortable="False" ShowDistinctFilters="False" UniqueName="ConditionImageName" DataMemberBinding="{Binding ConditionImageName}" />
    <telerik:GridViewImageColumn Header="Doc" DisplayIndex="9" IsFilterable="False" IsGroupable="False" IsReadOnly="True" IsSortable="False" ShowDistinctFilters="False" UniqueName="DocumentImageName" DataMemberBinding="{Binding DocumentImageName}" />
    <telerik:GridViewImageColumn Header="Comments" DisplayIndex="10" IsFilterable="False" IsGroupable="False" IsReadOnly="True" IsSortable="False" ShowDistinctFilters="False" UniqueName="CommentImageName" DataMemberBinding="{Binding CommentImageName}" />
</telerik:RadGridView.Columns>
0
Vera
Telerik team
answered on 21 Dec 2011, 04:54 PM
Hi Chris,

This issue has already been fixed and the fix for it is available with our just released Q3 SP1.

Best wishes,
Vera
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
General Discussions
Asked by
Chris
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Chris
Top achievements
Rank 1
Vera
Telerik team
Share this question
or