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
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>
I can see that you are setting width and height of grid also.
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?
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.
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?
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.
Thank you.
I've added a note to the supportcase, the sample has not the version I used, but it occurs in both Version (tested on my side) and I notet which version Im using.
So the sample seems to be ok. Now the current Status is "In Progress". Please let me know if you need any additional Input.
Markus
Hello Markus,Thank you for your update to this post. I have created a support case for your request which you may find under your account at Infragistics.Com. Please log onto your account using the My IG tag on the Infragistics website to find the support case.
I have attached a sample application created from the code you had supplied above to the case. Please use the attached sample to replicate the reported issue.If you have any questions regarding the sample application, let me know.Sincerely,Mike D.Developer Support EngineerInfragistics, Inc.
Hello Infragistics Support
Can you please give us advice what to do. Is there a need to submit a "bug request", will you do this for us or is there a workaround, patch or anything else?
Is there any workaround or fix available? I have the same problem in version 2009.1.527.35. I use a grid with StationaryMargins="Header" and Height="100%". I have the grid positioned within a splitter. So setting fixed pixel heights is not an option.
Roland
This image will make it clearer
http://img5.imageshack.us/img5/5355/ultrawebgrid.png
@Edit
Im using Version 8.3.20083.2059