I need to add a new record at specific index of a grid, but using xGridView.Items.Insert(myIndex, myObject) cause me this error:
Operation is not valid while ItemsSource is in use. Access and modify elements with ItemsControl.ItemsSource instead.
Any suggestion to do this job?
5 Answers, 1 is accepted
0
Hello,
Since you have ItemsSource assigned you may want to use directly methods of the collection bound to the grid instead. If you want unbound mode (direct usage of Items property) you can check this demo.
Regards,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Since you have ItemsSource assigned you may want to use directly methods of the collection bound to the grid instead. If you want unbound mode (direct usage of Items property) you can check this demo.
Regards,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
h g
Top achievements
Rank 1
answered on 27 Apr 2010, 09:06 AM
The collection that I'm using is RiaService DomainDataSource.Items and it has no proper method to have this need done,
What's your suggestion for this need?
0
Hello,
You can check this thread for more info.
Greetings,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
You can check this thread for more info.
Greetings,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
h g
Top achievements
Rank 1
answered on 27 Apr 2010, 09:32 AM
Thank you, but it's not my problem,
I can add the record to DomainDataSource but at will always add the new record at the end of records in grid, What I want is to add the new record at specific index of gridview
0
h g
Top achievements
Rank 1
answered on 01 May 2010, 01:57 PM
any suggestion?