Hi all
I am working on Custom DataGrid. In that I want to set visibility for particular columns dynamically. I am using a view to set dataSource property of that grid. From Microsoft's MSDN I using following expression for RowFilter search criteria.
To return only those columns with null values, use the following expression:
"Isnull(Col1,'Null Column') = 'Null Column'"
My problem is it works well for String data type columns. If I use numeric column then it throws an error like...
Error getting invoices for corporate . Error message: Cannot perform '=' operation on System.Int32 and System.String. Stack trace: at System.Data.BinaryNode.SetTypeMismatchError(Int32 op, Type left, Type right) at System.Data.BinaryNode.Compare(Object vLeft, Object vRight, Type type, Int32 op) at System.Data.BinaryNode.EvalBinaryOp(Int32 op, ExpressionNode left, ExpressionNode right, DataRow row, DataRowVersion version, Int32[] recordNos) at System.Data.BinaryNode.Eval(DataRow row, DataRowVersion version) at System.Data.DataFilter.Invoke(DataRow row, DataRowVersion version) at System.Data.Index.AcceptRecord(Int32 record) at System.Data.Index.InitRecords() at System.Data.Index..ctor(DataTable table, Int32[] indexDesc, DataViewRowState recordStates, IFilter rowFilter) at System.Data.DataTable.GetIndex(Int32[] indexDesc, DataViewRowState recordStates, IFilter rowFilter) at System.Data.DataTable.GetIndex(String sort, DataViewRowState recordStates, IFilter rowFilter) at System.Data.DataView.UpdateIndex(Boolean force) at System.Data.DataView.SetIndex(String newSort, DataViewRowState newRowStates, DataFilter newRowFilter) at System.Data.DataView.set_RowFilter(String value) at LIS.AccountingSummary.GetDataSource() in F:\LIS\Corporate\AccountingSummary.aspx.
vb:line 97.
Thanks for advance.
TRS