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.
Unfortunately, activation email could not send to your email. Please try again.

Filtering question

Thread ID:

Created:

Updated:

Platform:

Replies:

8616 Nov 13,2003 05:38 PM Nov 20,2003 01:25 AM Windows Forms 6
loading
Tags: GridControl
Jim Frapper
Asked On November 13, 2003 05:38 PM

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 13, 2003 07:10 PM

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 11:26 AM

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 01:01 PM

@#!$#@#! 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 03:31 PM

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 19, 2003 11:27 PM

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 01:25 AM

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.

CONFIRMATION

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.

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.

;