Hi, :)
I use a radgridview inside my application where certain words inside of cells should be marked. At the moment I solved this via DisableHTMLRendering and manipulating the data displayed in the cells... for instance with
I have a list of words to be marked and I want them to have a colored background... depending on the current word.
Works fine so far, but I do have problems with the encoding. Special characters, like "ä", "ö" are not displayed properly... is there any way to set the encoding?
I already tried to hard-convert my content to utf-8, but that didn't change anything.
The data is received from a SQLCE database... am I doing something wrong? Or is this only solvable via the webbrowsercolumns you mentioned in another thread? Will those webbrowsercolumns still be performant, if I do have thousands of them? :)
Thanks in advance!
Kind Regards
Fabian
I use a radgridview inside my application where certain words inside of cells should be marked. At the moment I solved this via DisableHTMLRendering and manipulating the data displayed in the cells... for instance with
cellInfo.Value =
"<html>"
+ cellInfo.Value.ToString() +
"</html>"
;
foreach
(KeyValuePair<String, Color> kvp
in
this
._highlightWords)
{
cellInfo.Value = Regex.Replace(cellInfo.Value.ToString(), kvp.Key,
"<span style="
+
'"'
+ "background-color:
" + System.Drawing.ColorTranslator.ToHtml(kvp.Value) + '"
' +
">"
+ kvp.Key +
"</span>"
, RegexOptions.IgnoreCase);
string
[] tmpString = Regex.Split(cellInfo.Value.ToString(), kvp.Key, RegexOptions.IgnoreCase);
}
I have a list of words to be marked and I want them to have a colored background... depending on the current word.
Works fine so far, but I do have problems with the encoding. Special characters, like "ä", "ö" are not displayed properly... is there any way to set the encoding?
I already tried to hard-convert my content to utf-8, but that didn't change anything.
byte
[] utf8String = Encoding.UTF8.GetBytes(cellInfo.Value.ToString());
cellInfo.Value = Encoding.UTF8.GetString(utf8String);
The data is received from a SQLCE database... am I doing something wrong? Or is this only solvable via the webbrowsercolumns you mentioned in another thread? Will those webbrowsercolumns still be performant, if I do have thousands of them? :)
Thanks in advance!
Kind Regards
Fabian