Hello, I bind a grid programmatically using NeedDataSource.
Filtering, sorting, paging, all work perfectly.
I have problems when SQL Server BIT columns are bound to a GridCheckBoxColumn and I allow filtering on it.
The problem is that in previous code the filter expression is something like ([MyBoolColumn] = True).
This expression is not valid when I pass it to SQL Server, because True is not a valid bit value (should be 1).
Is there any way to tell the grid to use 0/1 as filter values for GridCheckBoxColumns instead of False/True?
Thanks
Filtering, sorting, paging, all work perfectly.
myDataSource =
new
ObjectDataSource { ... };
myDataSource.Selecting += SourceSelecting;
...
private
void
SourceSelecting(
object
sender, ObjectDataSourceSelectingEventArgs e)
{
e.InputParameters[
"filterExpression"
] = myGrid.MasterTableView.FilterExpression;
}
I have problems when SQL Server BIT columns are bound to a GridCheckBoxColumn and I allow filtering on it.
The problem is that in previous code the filter expression is something like ([MyBoolColumn] = True).
This expression is not valid when I pass it to SQL Server, because True is not a valid bit value (should be 1).
Is there any way to tell the grid to use 0/1 as filter values for GridCheckBoxColumns instead of False/True?
Thanks