I assume that the VarChar value is mapped to a string field of a persistent class. In order to compare the two values, they have to be from the same type. You have two options - to convert the string value to integer or convert the integer value to string. You did not mention which way you want to go, so I will show you both of them. In both cases you can use the CompareTo
method which returns an integer indicating whether the first value is less, equal or greater than the second:
intValue = 124;
//convert the string to integer
result1 = intFromString.CompareTo(intValue);
//convert the integer to string
result2 = stringValue.CompareTo(intValue.ToString());
Please let us know if this is not what you are looking for and try to give some more details on what you are trying to achieve.
the Telerik team
Watch a video
on how to optimize your support resource searches and
check out more tips
on the blogs.
Follow the status of features or bugs in
and vote for them to affect their priority.