I may have a sort problem on one of my fields in a RadGrid.
I have a description field that is set in a RadEditor. It's rich text and unlimited length. (varchar(max)).
In the grid itself, when the field is displayed, I have a call in the ItemDataBound event handler to strip the field of HTML and only display the first 40 characters. The code for the stripping is as follows:
string clearText = Regex.Replace(incoming_string, "<(.|\n)*?>", "");
clearText = System.Web.HttpUtility.HtmlDecode(clearText);
Even with that the sort on that field does not appear to work perfectly. There are still a few records with stray characters. This may or may not be a problem in real life as these records are casually entered test data. Still I'd like to know if I'm doing anything basically wrong.
Suggestions?
I have a description field that is set in a RadEditor. It's rich text and unlimited length. (varchar(max)).
In the grid itself, when the field is displayed, I have a call in the ItemDataBound event handler to strip the field of HTML and only display the first 40 characters. The code for the stripping is as follows:
string clearText = Regex.Replace(incoming_string, "<(.|\n)*?>", "");
clearText = System.Web.HttpUtility.HtmlDecode(clearText);
Even with that the sort on that field does not appear to work perfectly. There are still a few records with stray characters. This may or may not be a problem in real life as these records are casually entered test data. Still I'd like to know if I'm doing anything basically wrong.
Suggestions?