Home > Software design >  How can I bind my gridview to a list of objects
How can I bind my gridview to a list of objects

Time:06-16

Iam using Devexpress winForms third party and I want to bind my datagridview to list so whenever the list changes it is reflected on UI

CodePudding user response:

first you must declare a list of type Bindinglist.Then

BindingList<yourObject> bindingList1 = new BindingList<yourObject>();
gridview1.Datasource = bindingList1;

Make sure your have INotify for each property of your object

  • Related