Is there a way to make the header row of a UD table appear two rows high so that the column caption (label) can wrap to show the whole header name while being a narrower column?
You can easily change the column width (by dragging the edges), but I want to change the column header height. How can I do this?
Chris,
This works for the body of the UD table, but it does not change the table Header Row (the column labels do not wrap and extend the height of the column header row).
My column name is Product Description (but the word Description is cut off and not displayed).
Scott,
I could certainly live with fixing the Header Line height (to 2 or 3), but it would be nice for users that like to customize their view, to adjust the column width and have the Header line expand to what is required.
I tried the band.GroupHeaderLines = 2; and unfortunately, my Header Line height remains at 1.
You can do it with existing controls too. You just have to get a reference (csm.GetNativeControlReference) and then wire up (and deregister) the event manually.
Here is the using statements and the start of my code for the grid.
using Infragistics.Win; //for DefaultableBoolen.True
using Infragistics.Win.UltraWinGrid;
...
private void GRID_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
{
e.Layout.Override.HeaderClickAction = HeaderClickAction.SortMulti;
UltraGridBand band = this.GRID.DisplayLayout.Bands[DATATABLE];
band.ColHeaderLines = 2;
band.GroupHeaderLines = 2;
I then went and added the WrapHeaderText, removed the new lines in the Caption and that worked, it wrapped the text in the 2 lines of the header (thanks for the tip Chris).