I'm getting error "Specified argument was out of the range of valid values.
Parameter name: index" on radgridview.
Currently, I use list collection(example : List<address>) bind to itemsource. -> address is class
Step to reproduce:
1. click "clik here to add new data", Input data -> let say name. then press enter.
2. clik button save. ->otomaticly save to database and reload data from database and rebind to radgridview.
3. click "clik here to add new data", I getting error "Specified argument was out of the range of valid values.
Parameter name: index"
Any ideas?
Regards,
11 Answers, 1 is accepted
Can you post the exception stack trace? More info about the grid version will be appreciated as well.
Regards,Vlad
the Telerik team
here is stacktrace error. ver WPF Q1 2010 SP2
Any ideas?
Regards,
Can you post the grid (and window/page) XAML? Can you verify if the grid is not inside StackPanel or ScrollViewer?
Regards,Vlad
the Telerik team
here is my code radgridview.
currently I create usercontrol, let say usercontrol1.xaml, this control contains radgridview.
On my form form1.xaml, I created System.Windows.Controls.GroupBox let saya groupBox1, and on groupBox1 I created usercontrol1.
<Grid Width="auto" Height="auto" Name="MasterGrid">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<telerik:RadGridView Grid.Row="1" AddingNewDataItem="radGridView1_AddingNewDataItem" Deleting="radGridView1_Deleting" Width="auto" Height="auto" HorizontalAlignment="Stretch" Name="radGridView1" VerticalAlignment="Stretch" CellValidating="radGridView1_CellValidating" />
</Grid>
Any Ideas?
Regards,
I'm not sure why you have two row definitions if only RadGridView is inside this Grid. Can you clarify also why you have "auto" for various heights and widths and HorizontalAlignmen/VerticalAlignment to "Stretch"?
Generally in this case everything will be autosized and stretched automatically:
<
Grid
Name
=
"MasterGrid"
>
<
telerik:RadGridView
Name
=
"radGridView1"
/>
</
Grid
>
Vlad
the Telerik team
I set width and height to auto because i want radgridview to fullsize, i will to try your suggestion.
Any way I set row.definition because i want to create dynamis controls on row position 0 (like dynamic button).
Any Ideas? Why I'm still getting error "Specified argument was out of the range of valid values.
Parameter name: index" on radgridview.
Regards,
for Silverlight this time :) I did place a ticket to follow on this as I have no clue why the code stops at the end of events of the grid and also if I remove the event, it still crashes but this time even thought I have full try catch in every events for the grid it never catchs anything
Also I put a breakpoint in all the events and no one is hit before it crashes after I did removed the event DataLoaded.
I'm lost. Will wait for a follow up in the ticket.
We are currently investigating the issue and we will notify you as soon as we have more information.
Thank you for your understanding.
Greetings,
Milan
the Telerik team
Could you please try to use our latest release (Q2) and check if the error is still there?
Sincerely yours,
Milan
the Telerik team
It was probably fixed in the latest version
and I had a fix so I set the CurrentColumn before going in add new mode and it was working then
this was fixed in the latest version.