We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Filtering question

Thread ID:





8616 Nov 13,2003 10:38 PM UTC Nov 20,2003 06:25 AM UTC WinForms 6
Tags: GridControl
Jim Frapper
Asked On November 13, 2003 10:38 PM UTC

I have a question regarding the sample in the Essential Grid Knowledgebase 10.7. Does this sample work with a non strongly typed dataset? In my sample project I am using a non strongly typed dataset and I am receiving errors when the datatype for the column is anything but a string. Basically the line '_dataTable.DefaultView.RowFilter = filter;' fails when doing a LIKE filter with any datatype other than a string. But of course the sample works fine with all datatypes. Cheers, JF

Jim Frapper
Replied On November 14, 2003 12:10 AM UTC

I have confirmed that the sample works with typed datasets and not with non-typed datasets. Cheers, JF

Jim Frapper
Replied On November 15, 2003 04:26 PM UTC

Essential Grid Knowledgebase 10.7 revisited. My previous post was incorrect. The sample does not use typed datasets. I am confused why I get datatype issues with my datasets vs. the ones constructed from the xml file in the sample. Here is a sample error message I am getting on an integer column "Cannot perform 'Like' operation on System.Int32 and System.String. This message makes sense because you cant do like clauses on integer columns. So basically I have no idea how your sample is working. JF JF

Jim Frapper
Replied On November 15, 2003 06:01 PM UTC

@#!$#@#! All of the columns in the samples dataset have a datatype of string. That is how the sample works. JF

Administrator [Syncfusion]
Replied On November 15, 2003 08:31 PM UTC

As you tracked down, that sample relies on the operator Like which is only valid for strings. I don't know of a simple way to write a 'StartsWith' numerical comparison using the tools supported by DataView.RowFilter calculations.

Markus Kraft
Replied On November 20, 2003 04:27 AM UTC

Hi, why is it to work with the Operant "Like" in INT-columns possibly? Wouldn't this choice have to be prevented? How can I influence the indication of the Operants? greetings markus

Administrator [Syncfusion]
Replied On November 20, 2003 06:25 AM UTC

Right now, there is not a simple way to do this. You would have to derive GridFilterbar, override GetFilterFromRow, and if the currentcell.Renderer.ControlText is (custom), display and handle you own dialog. This would take a little work. You could look at our source code to see how you might go about this. It would require defining your own dialog (maybe copying ours, and directly changing the code there in your copy). I have added a feature request to add code to make doing this easier and to check for proper operands in our list.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon