Prysson
asked on
c# RowFilter > or < with decimal columns
How would I filter a dataview on a deimcal column using > or < value..
For example I have a decimal d variable whose value is 100.1 I have a column called "size"
I want the row filter to filter so that only rows where the "size is greater than the d (100.1)
My current filter
dv.RowFilter = "size = '" + d.ToString() + "'";
does not work...
For example I have a decimal d variable whose value is 100.1 I have a column called "size"
I want the row filter to filter so that only rows where the "size is greater than the d (100.1)
My current filter
dv.RowFilter = "size = '" + d.ToString() + "'";
does not work...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
well, greater would need to be >= and not = ???
You stated you wanted "I want the row filter to filter so that only rows where the "size is greater than the d (100.1)". That is why I used only the greater sign.
If you want greater than or equal to use:
dv.RowFilter = "size > " + d.ToString();
If you want greater than or equal to use:
dv.RowFilter = "size > " + d.ToString();
ASKER
Much thank..nk in my code I was using the appropriate greater sign..just a mistype in the coe when I wrote up the question..removing the single quotes did the trick.