I want to show a lock symbol for a column of an ultragrid
Hi Chitra,
Our Controls use GDI+ by default, in order to use these Unicode characters you should switch to GDI using the property TextRenderingMode. So, for your scenario you would do something like this.
string lockSymbol = "1F512";
int value = int.Parse(lockSymbol, System.Globalization.NumberStyles.HexNumber);
string symbol = char.ConvertFromUtf32(value).ToString();
this.ultraGrid1.TextRenderingMode = Infragistics.Win.TextRenderingMode.GDI;
this.ultraGrid1.DisplayLayout.Bands[0].Columns["CompanyName"].Header.Caption = symbol.ToString();
If you want your lock symbol to have much clear look then, you should try using a background image.
Please let me know if you need further assistance.
Sincerely,
Sahaja Kokkalagadda
Associate Software Developer, Windows Forms
http://ko.infragistics.com/
Hi sahaja,
I have implemented the same code given by you,but its showing me something as below,in that locked header column i want to display the lock symbol
Infragistics Controls use GDI+ by default, but by setting the TextRenderingMode Property you can switch them over to GDI. Some extended Unicode characters like this lock symbol are not displayed when TextRenderingMode is GDI+. If you want to show lock symbol in column header you should set the lock symbol to column.Header.Caption. I’m attaching sample solution that you can use. If your application still displays a different symbol then I would check if there is something that’s blocking the application to use GDI TextRenderingMode. Please let me know if you need any further assistance.
www.infragistics.com/support