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
821
StationaryMargins="Header" with grid container
posted

Hello Dear

Im facing some problems with the grid size when using Stationary Margins. So I have an UltraWebGrid with StationaryMargins="Header". The container has for example 400px in Width and Height; Now I set the Grid's Framestyle to Width:100% and Height:100% then setting scrollbars to auto.

Now, the Grid is bigger in its hight than it could be relating to its container. Its seems that the grid size is 400px + the Hight of the fixed column from the stationary margin settings; --> It overlaps the div in the background (where the grid is containing in). If I set something position attribute on the container (which solved another problem when using the container to scroll) causes double scrollbars.

Here is my Code;

<div style="width:400px;height:400px;border-style:solid;border-width:1px;position:absolute">
    <igtbl:UltraWebGrid>
        <DisplayLayout  ScrollBar="auto" TableLayout="Fixed" />
        <FrameStyle Width="100%" Height="100%" HorizontalAlign="Center">
    </igtbl:UltraWebGrid

<div>

I just added the properties which make sense for this sample, its easily reproducable with a plain grid added from the toolbox. But I can provide a full sample if needed.

Do you have any Idea how I can make sure the grid always hats its correct height?

Thanks for your help.

Greetings

Parents
No Data
Reply
  • 821
    Offline posted

    Here is a very basic sample grid, which shows this behavior;

    <div style="width:150px;height:150px;border-style:solid;border-width:1px;position:absolute;display:">
     <igtbl:UltraWebGrid ID="UltraWebGrid2" runat="server"
            EnableAppStyling="True" Height="100%" Width="100%" >
            <Rows>
                <igtbl:UltraGridRow Height="">
                    <Cells>
                        <igtbl:UltraGridCell Text="abc">
                        </igtbl:UltraGridCell>
                        <igtbl:UltraGridCell Text="abc">
                        </igtbl:UltraGridCell>
                    </Cells>
                </igtbl:UltraGridRow>
                <igtbl:UltraGridRow Height="">
                    <Cells>
                        <igtbl:UltraGridCell Text="abc">
                        </igtbl:UltraGridCell>
                        <igtbl:UltraGridCell Text="abc">
                        </igtbl:UltraGridCell>
                    </Cells>
                </igtbl:UltraGridRow>
                <igtbl:UltraGridRow Height="">
                    <Cells>
                        <igtbl:UltraGridCell Text="abc">
                        </igtbl:UltraGridCell>
                        <igtbl:UltraGridCell Text="abc">
                        </igtbl:UltraGridCell>
                    </Cells>
                </igtbl:UltraGridRow>
                <igtbl:UltraGridRow Height="">
                    <Cells>
                        <igtbl:UltraGridCell Text="abc">
                        </igtbl:UltraGridCell>
                        <igtbl:UltraGridCell Text="abc">
                        </igtbl:UltraGridCell>
                    </Cells>
                </igtbl:UltraGridRow>
                <igtbl:UltraGridRow Height="">
                    <Cells>
                        <igtbl:UltraGridCell Text="abc">
                        </igtbl:UltraGridCell>
                        <igtbl:UltraGridCell Text="abc">
                        </igtbl:UltraGridCell>
                    </Cells>
                </igtbl:UltraGridRow>
            </Rows>
            <Bands>
                <igtbl:UltraGridBand  HeaderTitleModeDefault="Always">
                    <Columns>
                        <igtbl:UltraGridColumn>
                        <Header Fixed="True">
                            </Header>
                        </igtbl:UltraGridColumn>
                        <igtbl:UltraGridColumn>
                            <Header>
                                <RowLayoutColumnInfo OriginX="1" />
                            </Header>
                            <Footer>
                                <RowLayoutColumnInfo OriginX="1" />
                            </Footer>
                        </igtbl:UltraGridColumn>
                    </Columns>
                    <AddNewRow View="NotSet" Visible="NotSet">
                    </AddNewRow>
                </igtbl:UltraGridBand>
            </Bands>
     <DisplayLayout ScrollBar="auto" TableLayout="Fixed"  AllowColSizingDefault="Free"  StationaryMargins="Header"
                      AllowColumnMovingDefault="OnServer" AllowDeleteDefault="Yes" 
                 AllowUpdateDefault="Yes" BorderCollapseDefault="Separate"
                    HeaderClickActionDefault="NotSet"  Name="UG1" RowHeightDefault="20px"
                    RowSelectorsDefault="No" SelectTypeRowDefault="Extended"  Version="4.00"
                      ViewType="OutlookGroupBy" GroupByColumnsHiddenDefault="NotSet"
                      OptimizeCSSClassNamesOutput="True" >
                    <GroupByBox Hidden="true">
                        <BoxStyle BackColor="ActiveBorder" BorderColor="Window">
                        </BoxStyle>
                    </GroupByBox>
                    <GroupByRowStyleDefault BackColor="Control" BorderColor="Window">
                    </GroupByRowStyleDefault>
                    <RowStyleDefault BackColor="Window" BorderColor="Silver" BorderStyle="Solid" BorderWidth="1px">
                        <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="0px" WidthTop="0px" />
                        <Padding Left="3px" />
                    </RowStyleDefault>
                    <HeaderStyleDefault BackColor="LightGray" BorderStyle="Solid" HorizontalAlign="Left">
                        <BorderDetails ColorLeft="White" ColorTop="White"  />
                    </HeaderStyleDefault>
                    <EditCellStyleDefault BorderStyle="None" BorderWidth="0px">
                    </EditCellStyleDefault>
                   <ClientSideEvents  />
                    <ActivationObject BorderColor="" BorderWidth="">
                    </ActivationObject>
                                <Pager>
                    <PagerStyle BackColor="LightGray" BorderStyle="Solid" BorderWidth="1px">
                    <BorderDetails ColorLeft="White" ColorTop="White" />
                    </PagerStyle>
                </Pager>
                    <FrameStyle  Width="100%" Height="100%" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana"   HorizontalAlign="Center">
                    </FrameStyle>
                </DisplayLayout>
        </igtbl:UltraWebGrid>
    </div>

Children