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

Bind New Row to new DataSource Item

1 Answer 248 Views
GridView
This is a migrated thread and some comments may be shown as answers.
eSimSE
Top achievements
Rank 1
eSimSE asked on 08 Sep 2012, 11:55 AM
Hello,

I need to add a new item to my data-bound RadGridView DataSource. Is our only choice to maintain a List apart from the grid and re-set the DataSource? This is simple enough to do, but was wondering if there was a more strategic way to add a single item to the already-bound grid?

Thanks you...

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 10 Sep 2012, 01:47 PM
Hello Michael,

Thank you for writing.

Depending on the binding scenario in most cases the grid should automatically reflect any changes to the data source. For example if you use a DataTable it will work out of the box, if you want to bind it to a collection of custom objects the custom object should implement the INotifyPropertyChanged interface and the collection should implement the IBindingList interface (you can use BindingList<T> which implements it internally).

More information about the available scenarios is available here: http://www.telerik.com/help/winforms/gridview-populating-with-data-databinding-radgridview.html.

Let us know if you have any questions.
 
All the best,
Stefan
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Tags
GridView
Asked by
eSimSE
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or