Hi,
We have a strange issue with the HeaderStyleDefault.Wrap property. This value is set to true as follows;
<HeaderStyleDefault BackgroundImage="/ig_common/images/Themes/Aero/grid_header_bg.jpg"
BorderStyle="None" Cursor="Hand" Font-Bold="True" Font-Names="Trebuchet MS,Verdana,Arial,sans-serif"
Font-Size="X-Small" ForeColor="#555555" Height="23px" HorizontalAlign="Left" Wrap="true">
<BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px" />
<Padding Left="5px" />
</HeaderStyleDefault>
However, the column header text only wraps if a postback event has occured. If the grid is created when the page is first loaded the text never wraps.
We have also tried setting the wrap value to true within various stages of the page lifecycle such as CreateChildControls, OnIt, PageLoad and also the Infragistics event UltraWebGrid1_InitializeLayout.
We presume the problem is due to the grid not knowing the width of the columns until it has been created, but thats a total guess.
Does anyone else use this feature?
I do use that feature, but go about it differently. I'm not sure if this will help you, but I'll pass it along anyway.
I wrap the columns in the code behind column by column.
gridname.Columns.FromKey("RowName").Header.Style.Wrap = True
This has always worked.
Good Luck!
Hi Jarrad,
Thanks for taking the time to reply.
I have tried setting the column headers individually as you suggested but they still only wrap on a postback.
Where in the page life cycle do you set the headers to wrap. At the moment I'm iterating the columns straight after I had called DataBind;
//bind to the data source
this.UltraWebGrid1.DataBind();
{
}
Thanks again
Russ