3 Answers, 1 is accepted
0
Hello Shaolin,
Thank you for writing.
In order to customize the grid cells, it is appropriate to use the CellFormatting event. The following help article demonstrates a approach: http://docs.telerik.com/devtools/winforms/virtualgrid/cells/formatting-data-cells
I hope this information helps. Should you have further questions I would be glad to help.
Regards,
Dess
Telerik
Thank you for writing.
In order to customize the grid cells, it is appropriate to use the CellFormatting event. The following help article demonstrates a approach: http://docs.telerik.com/devtools/winforms/virtualgrid/cells/formatting-data-cells
I hope this information helps. Should you have further questions I would be glad to help.
Regards,
Dess
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Shaolin
Top achievements
Rank 1
answered on 13 May 2016, 12:34 PM
Hi Dess,
The issue is that I can only change Font property by using CellFormatting event. What I need is change styles of the font and I do not want to create a font for individual cell. Is there a way to set a font for all cells in a column?
Regards,
Shaolin
0
Accepted
Hello Shaolin,
Thank you for writing back.
You can't assign the font for a column by setting a given property. The CellFormatting event is the appropriate place to assign a specific font to the desired column:
I hope this information helps. If you have any additional questions, please let me know.
Regards,
Dess
Telerik
Thank you for writing back.
You can't assign the font for a column by setting a given property. The CellFormatting event is the appropriate place to assign a specific font to the desired column:
Font f =
new
Font(
"Arial"
, 12f, FontStyle.Italic);
private
void
radVirtualGrid1_CellFormatting(
object
sender, Telerik.WinControls.UI.VirtualGridCellElementEventArgs e)
{
if
(e.CellElement.ColumnIndex == 3)
{
e.CellElement.Font = f;
}
else
{
e.CellElement.ResetValue(LightVisualElement.FontProperty, ValueResetFlags.Local);
}
}
I hope this information helps. If you have any additional questions, please let me know.
Regards,
Dess
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.