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.
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.
This image will make it clearer
http://img5.imageshack.us/img5/5355/ultrawebgrid.png
@Edit
Im using Version 8.3.20083.2059
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
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?
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.
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