I can't think of any simple way to do this offhand. A couple of approaches
off the top of my head:
1) in your select statement the builds the data that the dataview is
pointing to, add a calculated column which is a number specifying the sort
order. In your SQL statement it should not be difficult to set all null
fields to sort order 1million or something. Then when your grid sorts on
that column, have it actually sort by the hidden sort order column.
2) Manually sort the data yourself into another data structure and bind to
that instead
"mdb" <m_b_r_a_y@c_t_i_u_s_a__d0t__com> wrote
I have a datagrid that is bound to a DataView, and it shows events and the
times that event started ("StartTime") and stopped ("EndTime"). If the
event
has started but hasn't finished, then "EndTime" is null. When multiple
lines
are displayed in the datagrid, if I sort by EndTime, then the null values
end
up sorted incorrectly - they are sorted as if 'null' is minimum - but I
need
them to sort as if 'null' is maximum...
Any suggestions? I cannot sort by StartTime (the description above is
simplified).
--
-mdb