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
Hello Mr. Dicarlo
Thanks for your reply;
I checked your suggestion in my test-environment and in the Sample I posted. The Width and Height are set to both the framestyle and the UltraWebgrid. But this did not solve my issue (I also tested with Height and Width only at framestyle).
The grid is still to large in its height (miscalulated by the height of the "stationarymargin" --> Fixed Header Size).
It wouldnt be a big deal if I could set the container to a fixed size and add padding to correct the miscalcluations. But we use the infragistics grid in a splitter view (so the user can change the container size as he feels free to) and the Toolbarheight is also dynamically configured by the customer (so it can vary in its height, depending on linebreaks, font sizes etc.)
At the moment I scroll with the container, but this is not really satisfiying when you have large grids and always have to scroll up to see the header...
Thanks for any help getting this fixed.
Hello mfoser,
Thank you for submitting this post along with your sample code to the Infragistics forums. I tested the property settings you highlighted, as well as with the Doctype noted and it seems that the FrameStyle Height and Width will supersede the fixed height and width you had set for the WebGrid. This will cause the scrollbars to display, but they are not enabled.
Try setting the same width and height sizes for the both the WebGrid and the FrameStyle and see if this clears anything up. Set the Headers to StationaryMargins and both the horizontal and vertical scrollbars should be available for scrolling.
Please let me know if this information resolves your issue.
Sincerely,Mike D.Developer Support EngineerInfragistics, Inc.
If you are setting height and width of grid = 100% then the container div’s scrollbar will not be displayed. Does this make sense? Is it correct behavior?
Yes, this is expected since the grid scrolls itself with a fixed Header(StationaryMargins="true"), the container should not scroll. We use the same Doctype as you posted. @Edit No plan why this is viewed bold
Any answer from Infragistics to this case?
I can see that you are setting width and height of grid also.
If your container contains only grid then try setting height and width of grid only.
For overlapping issue also try following:
Do you have following block on the top of .aspx page?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Could you try after removing this?
Let me know if this works.
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>