Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
105
UltraWebGrid Header Alignment Problem when using Fixed Headers & AppStyling
posted

Here's my problem:

Here's My .aspx Code:

------------------------------

 

<igtbl:UltraWebGrid 

    ID="UltraWebGrid1" 

    runat="server" 

    DataSourceID="SqlDataSource_sp_rs_Build_Study_Calendar"

    EnableAppStyling="True" 

    StyleSetName="Office2007Black">

    <DisplayLayout Name="UltraWebGrid1" 

        AllowColSizingDefault="Free" 

        AllowSortingDefault="OnClient" 

        HeaderClickActionDefault="SortSingle" 

        RowHeightDefault="20px" 

        StationaryMargins="Header" 

        StationaryMarginsOutlookGroupBy="False" 

        TableLayout="Fixed" 

        Version="4.00" 

        ViewType="Flat" 

        RowSelectorsDefault="No" >

        <RowStyleDefault Font-Size="10pt">

            <Padding Left="3px" />

        </RowStyleDefault>

        <FrameStyle 

            Width="100%">

        </FrameStyle>        

    </DisplayLayout>

</igtbl:UltraWebGrid>   

--------------------------------------------

Here's my .aspx.vb code:

'################################

 

Private Sub UltraWebGrids_InitializeLayout(ByVal sender As Object, ByVal e As LayoutEventArgs) Handles UltraWebGrid1.InitializeLayout

        'Set Default Width

        e.Layout.Bands(0).DefaultColWidth = New Unit("100px")

 

        'Lock first column & set width & left h-align & Bold

        e.Layout.UseFixedHeaders = True

        e.Layout.Bands(0).Columns(0).Header.Fixed = True

        e.Layout.Bands(0).Columns(0).Width = New Unit("200px")

        e.Layout.Bands(0).Columns(0).CellStyle.Font.Bold = True

        e.Layout.Bands(0).Columns(0).CellStyle.BackColor = System.Drawing.ColorTranslator.FromHtml("#F3EDE0")

 

        'Set all other cells to center H-align

        Dim maxcount As Integer

        maxcount = UltraWebGrid1.Columns.Count() - 1

        Dim i As Integer

        For i = 1 To maxcount

            e.Layout.Bands(0).Columns(i).Header.Style.HorizontalAlign = HorizontalAlign.Center

            e.Layout.Bands(0).Columns(i).CellStyle.HorizontalAlign = HorizontalAlign.Center

        Next

 

        'Set Scrollbars

        e.Layout.ScrollBar = ScrollBar.Always

        e.Layout.ScrollBarView = ScrollBarView.Both

    End Sub 'UltraWebGrid1_InitializeLayout

'################################

 

 

Suggestions offered on http://forums.infragistics.com/forums/t/9062.aspx have had no effect.

Disabling AppStyling (EnableAppStyling="False") fixes the alignment problem, but is not an acceptable solution.

Disabling UseFixedHeaders (UseFixedHeaders="False") also fixes the alignment problem, but again this is not an acceptable solution.

 

Any ideas on what I can change in order to fix the alignment problem???

 

Parents
No Data
Reply
  • 105
    Verified Answer
    Offline posted

    Bloody brilliant! killercolt suggestion solved the problem!

    HeaderStyleDefault --> BorderStyle --> Set to any thing except for NotSet & None

    Set a BorderColor & BorderWidth and PROBLEM SOLVED!

    Thanks killercolt!

Children
No Data