I want do make null text italic. Is there any thing like null text appearance? If not, is there any way to implement that in code efficiently?
Hi Amiram,
There is no such property specifically for the NullText property of the grid. You may want to open a feature request for it at the link below:
http://devcenter.infragistics.com/protected/requestfeature.aspx
What I can offer you is the following:
private void ultraGrid1_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
{
if (e.Row.Cells[2].Value.ToString()=="" )
e.Row.Cells[2].Appearance.FontData.Italic = Infragistics.Win.DefaultableBoolean.True;
else
e.Row.Cells[2].Appearance.FontData.Italic = Infragistics.Win.DefaultableBoolean.False;
}
The InitializeRow event would fire evry time the row is updated, then you can make a check and set the font as Italic or not.
Regards,
Stefaniya
Thanks, but this code will create a cell in memory for each value which is not efficient at all. I can use the GetCellValue to avoid that for the "if" statement, but is there any way to change the font without using the Cells property?