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

Cannot add to RadGridView

1 Answer 78 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mohammed
Top achievements
Rank 1
Mohammed asked on 22 Feb 2015, 09:57 PM
Hello Guys ,

I am newbie with tererik RadGridview with winforms and I build form that have collection of custom object called SaleBillDetailsDTO the grid showed values correctly but when I add new item in grid the data disappear

BindingSource bsData = new BindingSource();
var listBinding = new BindingList<SaleBillDetailsDTO>(lstSBDetails);
bsData.DataSource = listBinding;
radGridView2.DataSource = bsData; 
 
// Allow the user to add rows
((BindingList<SaleBillDetailsDTO>)bsData.List).AllowNew = true;
((BindingList<SaleBillDetailsDTO>)bsData.List).AllowRemove =
true;  

What should I do to add new row ? If you have sample tutorial it will be very helpful

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 23 Feb 2015, 09:26 AM
Hello Mohammed,

Thank you for writing.

I would suggest that you go through this article which explains how to bind to a collection of custom objects: 
Reflecting Custom Object Changes in RGV | UI for WinForms Documentation.

I hope that you find this information useful. Should you have any other questions, do not hesitate to contact us.

Regards,
Stefan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
GridView
Asked by
Mohammed
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or