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

Insert record at specific index

5 Answers 29 Views
GridView
This is a migrated thread and some comments may be shown as answers.
h g
Top achievements
Rank 1
h g asked on 26 Apr 2010, 11:35 AM
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

Sort by
0
Vlad
Telerik team
answered on 26 Apr 2010, 12:03 PM
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.
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
Vlad
Telerik team
answered on 27 Apr 2010, 09:27 AM
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.
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?
Tags
GridView
Asked by
h g
Top achievements
Rank 1
Answers by
Vlad
Telerik team
h g
Top achievements
Rank 1
Share this question
or