G
Guest
Two options:
1. Build the criteria into your database select.
2. Set a rowfilter in the full dataset itself, then do the databind.
3. Bind your unfiltered dataset, then trap in the ItemDataBound event of the
grid, e.g. get your row, do your checks, then maybe hide that row (e.g.
e.item.visible=false).
I use one or the other depending on the relative number of rows I expect to
hide, or whether the filter criteria are easy to specify in the sql or are
better-suited to do in the code.
Bill
1. Build the criteria into your database select.
2. Set a rowfilter in the full dataset itself, then do the databind.
3. Bind your unfiltered dataset, then trap in the ItemDataBound event of the
grid, e.g. get your row, do your checks, then maybe hide that row (e.g.
e.item.visible=false).
I use one or the other depending on the relative number of rows I expect to
hide, or whether the filter criteria are easy to specify in the sql or are
better-suited to do in the code.
Bill