Hi Everyone
I have Ultragrid and i have column called text where there is some text and other columns like font-family,style,size,weight,color,backcolor,border and bordercolor. If i change some values in this it should get reflected in the text column according to the chosen values from all these.
I tried to do it in but i couldn get it i dont know where i have gone wrong.
Is there any way to do it.
Colud someone help me please
Thanks in advance
Ferdin
You mean for each column I have to set style to some value like:
grid.DisplayLayout.Bands[0].Columns[0].Style = ColumnStyle.FormattedTextEditor (//to enable editing)
How can I set font size if the above is correct?
Thanks,
Nitin Jain
Hi Nitin,
Yes, you could use this event in order to set the 'Style' of the entire column to formattedtext.
Hi Boris,
I need to apply on each and every cell. So can I do this on grid.DisplayLayout.Override.CellAppearance in grid initialize event?
Hello Nitin,
Please try the following approach and let me know if it suits your needs:
private void ultraGrid1_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
{
e.Row.Cells[0].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.FormattedText;
e.Row.Cells[0].Value = "<font size=\"7.25pt\">This way the\n text size is altered even\n when the cell is not in edit mode.</font>";
}
Hi,
How can I change the font size for every cell. I tried to set CellAppearance.FontData.SizeInPoints = 7.25f, but it seems to be effective only when the cell is in edit mode, otherwise it comes to the normal text size as soon as I make the cell non-editable.
Any ideas on this?