Hey Guys,
got a bit of a problem which i hope somebody can point me to a solution for.
Filtering on a SPGridView...
i'm binding to an ObjectDataSource which contains a DataTable and have enabled
filtering.
i then add the list of columns to the FilterDataFields property and add the
FilteredDataSourcePropertyName value of "FilterExpression".
unfortunately it's only possible to actually add one value for
FilteredDataSourcePropertyFormat...and here's the problem..
i need to be able to filter on a DateTime as well as the rest of the columns -
which are mostly strings (one step at a time).
if i add "{1} LIKE '{0}'" it'll work fine on the strings (naturally) but fails
with an error on the DateTime column. if i add "{1} > #{0}#" it'll work on the
DateTime column but naturally fail on the string.
i've tried iterating through the datacolumns of the grid and adding their own
Expression value (eg. if it's a string, add the LIKE expression, if a datetime
add the datetime expression) - and that doesn't work either.
how on earth can i make this work? should i convert the DateTime to a string?
or what?
help :(
Cheers
Brian H. Madsen
Microsoft MVP Visual Developer ASP.Net
------------------------------------------------------------------- OzMOSS.com
- to unsubscribe from this list, send a message back to the list with
'unsubscribe' as the subject.
Powered by mailenable.com