How to sort a ERLB ?

How to sort a ERLB ?

Old forum URL:

dg78 posted on Tuesday, March 16, 2010



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 ?





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