Data Binding with CSLA 3.6.0

Data Binding with CSLA 3.6.0

Old forum URL: forums.lhotka.net/forums/t/6274.aspx


rob.polak posted on Wednesday, January 28, 2009

So I am attempting to set up a project that does simple binding to a DataGridView

I have the Following:

DomainList - Editable Root List
Domain - Editable Root

I have the logic for filling the object working correctly, and it is filling my data grid correctly, however, the sorting is not working.

I have a binding source called domainListBindingSource which points to the DomainList class.. and then in code:

            _coreData = (DomainList)e.Result;
            domainListBindingSource.DataSource = _coreData;

What am I missing to get sorting working correctly?

rfcdejong replied on Wednesday, January 28, 2009

Are u using WPF or Windows?
And what for kind BindingSource are u usingt?

If it's WPF then u can't use a BindingList for sorting. In WPF u should be using an ObservableCollection instead.

Copyright (c) Marimer LLC