Wrox Programmer Forums
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 13th, 2006, 04:39 AM
Authorized User
 
Join Date: May 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help - RowFilter

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






Similar Threads
Thread Thread Starter Forum Replies Last Post
VB starter kit - Rowfilter code doesn't work Bucephalus VB Databases Basics 0 May 26th, 2006 05:56 PM
How to filter Date field using DataView.RowFilter jkusmanto VB.NET 2002/2003 Basics 1 April 18th, 2006 12:48 AM
[important]rowfilter ahooi Pro VB.NET 2002/2003 0 July 11th, 2005 10:57 PM
Rowfilter in Visual Basic.Net ahooi Pro VB.NET 2002/2003 0 July 5th, 2005 03:58 AM
Rowfilter in Visual Basic.Net ahooi ASP.NET 1.0 and 1.1 Basics 0 July 5th, 2005 03:51 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.