Hi,
I am adding dynamic column to ultragrid. I have set the Width and height as below.
bgCandE.DisplayLayout.Override.DefaultRowHeight = 50;
bgCandE.DisplayLayout.Override.DefaultColWidth = 200;
and enable word wrapping and truncation using the below code in the
ultragrid InitializeLayout event.
ugCol.CellMultiLine =
DefaultableBoolean.True;
ugCol.Band.Columns[ugCol.Key].CellMultiLine =
1) Word Wrapping and truncation is not happening for Column Header.How to achieve word wrapping and truncation in the dynamic column header.
2) For the above set column height and width ,it display three rows and truncation happens. If value in the cell is small whcih fits for the only one line,it always displays height of three rows but i want don't want to display the blank row in the cell.
If it has value for one row,then only one row has to be displayed which no blank row.If it has the value for two rows,then two rows has to be displayed which no blank row. if it has three or more rows,truncation should happen and display three rows only.
How to achieve this.
Thanks in advance
Regards
Vijay A
a_vijay said: 1) I want to set the column header height, So i can adjust the size to make it display 3 lines. Please see the problem i have in the "screen shot" above.
It depends on the RowLayoutStyle of the band. In the normal, default style, you would set the ColHeaderLines property on the band. In ColumnLayout or GroupLayout mode, you can just drag and drop the lower edge of the column headers or set the PrefferredLabelSize.
a_vijay said: 2) Even though i do not have cell with larger content in the row,it display the row with height which is set in the InitializeLayout. I have set the column width as follows bgCandE.DisplayLayout.Override.DefaultRowHeight = 50; bgCandE.DisplayLayout.Override.DefaultColWidth = 200; e.Layout.Override.RowSizing = RowSizing.AutoFree; I have attached the "Screen Shot" below image.
2) Even though i do not have cell with larger content in the row,it display the row with height which is set in the InitializeLayout.
I have set the column width as follows
e.Layout.Override.RowSizing = RowSizing.AutoFree;
I have attached the "Screen Shot" below image.
Why are you setting a DefaultRowHeight if you are setting RowSizing to AutoFree? That's contradictory. There's no reason to set both.
Hi Mike,
Any solution to the above query?
1) I want to set the column header height, So i can adjust the size to make it display 3 lines. Please see the problem i have in the "screen shot" above.
I'm afraid I do not understand what you are asking. Can you explain in more detail?
1) I have set the column height and is it possible?
2) e.Layout.Override.RowSizing = RowSizing.AutoFree does reduce the row height based on the cell content dynamically.
AutoFree property will resize the row based on the largest cell in the Row. Even though i do not have cell with larger content in the row,it display the row with height which is set in the InitializeLayout
I am asking the question/Soultion for the fix.