Hi,
I am running a Silverlight 4 application containing two views, each view containing a grid which is created dynamically each time the view is shown. Occasionally the grid causes the application to crash:
Laufzeitfehler in Microsoft JScript: Unhandled Error in Silverlight Application
Code: 4004
Category: ManagedRuntimeError
Message: System.ArgumentOutOfRangeException: Das angegebene Argument liegt außerhalb des gültigen Wertebereichs.
Parametername: index
bei Telerik.Windows.Controls.GridView.GridViewCellsPanel.BringIndexIntoView(Int32 index)
bei Telerik.Windows.Controls.GridView.GridViewCellsPanel.InternalBringIndexIntoView(Int32 index)
bei Telerik.Windows.Controls.GridView.DataCellsPresenter.ScrollCellIntoView(Int32 index)
bei Telerik.Windows.Controls.GridView.GridViewRow.ScrollCellIntoView(Int32 index)
bei Telerik.Windows.Controls.GridView.GridViewDataControl.ScrollColumnIntoView(GridViewColumn column)
bei Telerik.Windows.Controls.GridView.GridViewDataControl.<>c__DisplayClass6e.<ScrollIntoViewAsync>b__6d(FrameworkElement f)
bei Telerik.Windows.Controls.GridView.GridViewDataControl.<>c__DisplayClass77.<ScrollIntoViewRecursive>b__73()
Version of grid view dll is 2010.3.1110.1040.
Can you help?
Thanks and regards
Stefan
7 Answers, 1 is accepted
This version in our Q3 2010. Can you try our latest service pack (Q3 2010 SP1) instead?
Best wishes,Vlad
the Telerik team

Similar (maybe same) issue in the latest version:
Product: Telerik RadControls for Silverlight Q3 2010 SP1
Version: 10.3.1314.0
-----------------------
RadGridView control
You have some data (bound) in the control and you use grouping.
You try to use the
BringIndexIntoView(
int
index)
method in order to keep programmatic selection visible. Depending on the index you passed, there are two possible, both undesired outcomes:
1. If you pass the index argument a value in the range of top-level groups number, nothing happens.
2. If you pass index beyond the top-level group count, an exception is thrown (though it's still a valid row index):
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: index
at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.BringIndexIntoView(Int32 index)
at Telerik.Windows.Controls.GridView.BaseItemsControl.BringIndexIntoView(Int32 index)
Code example:
void
MyServiceRequestCompleted(
object
sender, MyServiceRequestCompletedEventArgs e)
{
radChart1.ItemsSource = e.Result;
GridView1.GroupDescriptors.Clear();
// NOTE! Removing this line (no grouping) fixes the problem:
GridView1.GroupDescriptors.Add(
new
ColumnGroupDescriptor { Column = GridView1.Columns[
"MyGroupingPath"
] });
GridView1.ItemsSource = e.Result;
}
void
ChartArea_ItemClick(
object
sender, ChartItemClickEventArgs e)
{
var item = e.DataPoint.DataItem;
if
(GridView1.Items.Contains(item))
{
GridView1.SelectedItem = item;
int
selectedIndex = GridView1.Items.IndexOf(item);
// "Boom" when selectedIndex is greater than "MyGroupingPath" column distinct values
GridView1.BringIndexIntoView(selectedIndex);
}
}
We can confirm that BringIndexIntoView() has some problems in grouped scenario. We may suggest you to use ScrollIntoView() or ScrollIntoViewAsync() instead.
All the best,
Yordanka
the Telerik team

i have the same disaster - use the Telerik-RadGridView and get the same error by binding(refreshing the table, wich currently not visible).
I use the version: 2010.3.1314.1040
Have you bugfree version??
Do your best,
Alexey.
Have you tried to use other methods as suggested in this thread?
Greetings,Vlad
the Telerik team

I do not use BringIndexIntoView(int..) in my code!
In this case can you post more info about the grid version and the exact problem at your end? Can you send us an example where we can reproduce this exception?
Kind regards,Vlad
the Telerik team