newbie question

  • Thread starter Thread starter PJ6
  • Start date Start date
P

PJ6

I have a collection of objects that can be bound directly as a data source
into a DataViewGrid... works great, but now I can't figure out how to get
the columns sorted in the order that I want, or how to hide certain columns.
Is this possible?

Paul
 
You may be a newbie, but this is actually a bit more advanced than you might
think. If you want to sort on a single column, you can have your objects
inherit from a sortable collection. If that is not an option, you will have
to figure out the sort method, yourself. A linked list works if you are not
constantly going to pop new objects on and off the "stack".

A custom option that can work is give each object and id and used a sorted
list to sort on the column. You can then grab each object by ID. This is
extremely flexible, but it costs a small amount of overhead. It is the most
flexible if you have to sort on a variety of columns.

Just ideas.

--
Gregory A. Beamer

*************************************************
Think Outside the Box!
*************************************************
 
Not interested in sorting rows.

To rephrase, I'm interested in chaonging the order the columns (i.e. col1,
col2, col3... ) in the grid and also chosing which ones to display. Is that
possible?

Paul
 
Yes, turn off the auto fill and manually bind the columns to items. I was
thinking far too complex. Thanks for the callback.

--
Gregory A. Beamer

*************************************************
Think Outside the Box!
*************************************************
 
Back
Top