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.
I have confirmed that the sample works with typed datasets and not with non-typed datasets.
JFJim FrapperNovember 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.
JFJim FrapperNovember 15, 2003 01:01 PM
All of the columns in the samples dataset have a datatype of string. That is how the sample works.
ADAdministrator Syncfusion Team 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.
MKMarkus KraftNovember 19, 2003 11:27 PM
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?
ADAdministrator Syncfusion Team 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.