Grid Binding

Grid Binding

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


Pieterv posted on Wednesday, June 27, 2007

Hi everybody,

I'm fairly new to CSLA and was wondering which object to bind to a datagrid?
I does not need to be editable, just a list of records in a table.

I've used ReadOnlyListBase but are only able to get 2 columns back.
How do I retrieve the rest of the table or at least more than 2 columns?

Also, how would I then filter the datagrid? I used to use a DataView, will it work the same way?

Thanks!

-Pieter

JoeFallon1 replied on Wednesday, June 27, 2007

For sorting and filtering you have a few choices.

Rocky includes SortedBindingList and FilteredBindingList in Csla. One of the nice things about these 2 is that they are composable - you can take one and use the other against it.

Limitation - only single property sorting exists.

I use the ObjectListView over in CslaContrib. It is an excellent piece of code and works for multiple property sorting. It also does filtering.Search this forum for sample code on how to use it.

Joe

 

Pieterv replied on Wednesday, June 27, 2007

Thanks Joe. Will check it out.

I got the Grid/Multiple columns issue sorted out as well.Classic case of fingers in gear, brain in neutral Stick out tongue [:P]

Copyright (c) Marimer LLC