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

Generic Listing issue with Adding Rows

3 Answers 186 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 07 Aug 2008, 02:36 PM
I have set the datasource of my radgrid to a generic list. But when I try clicking to add a new row....I get the error "The list must be an IBindingList to AddNew".

Is it not possible to add rows when using a generic list as my datasource?

Ryan

3 Answers, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 08 Aug 2008, 10:45 AM
Hi Ryan,

The IList generic does not support notification event like ListChanged and when you make some CRUD operation in the list the RadGridView will not receive notification. The IBindignList interface supports this behavior and it is implemented in DataTable, BindingSource and many other data objects. You can use its default implementation BindingList generic.

In order to support ItemChanged in BindingList  too, you must implement INotifyPropertyChanged for your business object.

I hope this was helpful. If you have additional questions, please contact me.

All the best,
Julian Benkov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
shinu rag
Top achievements
Rank 1
answered on 19 Jul 2010, 08:56 AM
Can u explain with an Example???
0
Svett
Telerik team
answered on 22 Jul 2010, 12:22 PM
Hi shinu rag,

The class and the interface that my colleague mentioned are not provider by Telerik. They are build-in type in .NET Framework. Hence, if you need to know more about them, you have to log on to MSDN websites.
You can read more about how you can implement INotifyPropertyChanged interface in this MSDN documentation article. Also you can see how to use BindingList<T> in this MSDN documentation page.

Best wishes,
Svett
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
Tags
GridView
Asked by
Ryan
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
shinu rag
Top achievements
Rank 1
Svett
Telerik team
Share this question
or