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

Inserting Row in between

3 Answers 48 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Keshava
Top achievements
Rank 1
Keshava asked on 24 Jan 2011, 06:34 AM
Hi ,
 I am using raddomaindatasource to get and bind the data
when I am trying to insert a row it shows the following error message

operation is not valid,itemssource in use..access and modify the elements with itemscontrol.itemssource..

Web.SupplierAccount currentItem = radGridView1.SelectedItem as Web.SupplierAccount;
Web.SupplierAccount newrow = new Web.SupplierAccount();
radGridView1.Items.Insert(radGridView1.Items.IndexOf(currentIte


3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 24 Jan 2011, 07:44 AM
Hi,

 When the grid is bound (ItemsSource is assigned) you cannot modify Items collection. You should do this in your ItemsSource instead. 

Kind regards,
Vlad
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Keshava
Top achievements
Rank 1
answered on 24 Jan 2011, 07:48 AM
Can you provide me with a sample to work out this
0
David
Top achievements
Rank 1
answered on 26 Jan 2012, 07:48 PM
But wat if the ItemsSource is a QueryableDomainServiceCollectionView?
Tags
GridView
Asked by
Keshava
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Keshava
Top achievements
Rank 1
David
Top achievements
Rank 1
Share this question
or