How to sort a ERLB ?

How to sort a ERLB ?

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


dg78 posted on Tuesday, March 16, 2010

Hi,

 

To manage some data, I use a datagridview (WinForms) bound to a ERLB (data saved once the row changes). Everything is OK.

But now, I want to be able to sort rows of the datagridview with a mouse click on the column header.

With a SortedBindingList, there is no problem for that but with a ERLB it is not possible because ERLB is not sortable.

 

How to have the same with a ERLB ?

Must I implement a sort on  ERLB? How to do that ?

 

Thanks

 

Dominique

ajj3085 replied on Tuesday, March 16, 2010

When binding your BindingSource, you should be able to use bindingSource1.DataSource = new SortedBindingList<MyBO>( myErlb );

Is that not working?

dg78 replied on Tuesday, March 16, 2010

Thanks, Andy.

 

Sure it is the solution, it works.

I did not think to use that. The worst is I used often SortedBindingList.

With this prolonged winter, I think I am tired.

 

Still thanks

Copyright (c) Marimer LLC