winformsdevexpressdevexpress-windows-ui

How can I bind my gridview to a list of objects


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


Solution

  • 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