Hi,
I am using an ultrawebgrid with the StationaryMargins="Header" Option. There are a couple of queries I had about using this option.
1. When using the StationaryMargins is it possible to set the width of a UltraGridColumn to a percentage? Say 50% or something? Whenever I attempt to do this, it ends up not displaying that particular column.
2. Is there any way to set the height of the scrollable portion of the grid (Not the whole grid)
Thanks in advance.
You should be able to set the column to a relative width, just be sure you know what you're setting it relative to. Do you have a width set on the Grid? Also, how many columns are in there, and what are their widths set to? I think there might be stricter requirements on sizing when stationary margins are true, but I still expect that you'll be able to size the column with a %.
For setting the height of the scrollable portion of the grid - I think it I could better understand the question if I understood what result you're trying to acheive. Worse comes to worse, you can always write a targeted CSS selector which affects only the size of the desired element (the tbody in this case).
-Tony
Hi Tony,
Thanks. I managed to figure out how to resize the height of the grid. However the % based columns is still not possible. The moment I specify a width % for the column, the column does not render on the page. The grid does have a width and there are about 8 columns. If I remove the width attribute the page shows up fine with all columns having a default fixed width of 100.
Any other suggestions?
Thanks in advance
Hmm, hard to say if it's a bug or not. But I'd recommend speaking to our Developer Support team. (http://es.infragistics.com/gethelp)
I think column sizing is one of those topics I'm going to need to sit down and write a couple of blog entries about. It seems that there's a lot of trouble getting this done, which makes me thing we've made it more complicated that it needs to be. I'll do a deep dive over the next couple of weeks and post results to my blog (http://blogs.infragistics.com/blogs/tony_lombardo). I know this probably doesn't help you today, but hopefully our support staff can take care of that.
I also confirmed this Tony. When you have 2 columns in an UltraWebGrid and you size these columns each to 50% and have row selectors turned on I believe it interferes with the columns width in Firefox. IE handles the percentages but Firefox will only set one of your columns width and the other one is hidden.
I went about defining default column widths and realized that with doing that made the Grid scroll horizontally. This is because I believe when you are factoring in column widths you must take into account the row selector as it's own column too. It seems like the only time it will render both in IE and Firefox almost the same is defining Unit.Pixel width's.
EnableCrawlerDetection="true" Height="275px" Width="420px"
SkinID="GridSkin">
<Bands>
<igtbl:UltraGridBand>
<AddNewRow View="Bottom" Visible="Yes">
</AddNewRow>
</igtbl:UltraGridBand>
</Bands>
AllowUpdateDefault="Yes" BorderCollapseDefault="Separate"
RowHeightDefault="20px" SelectTypeCellDefault="Single" AllowDeleteDefault="No"
StationaryMarginsOutlookGroupBy="True" TableLayout="Fixed" Version="4.00"
AllowAddNewDefault="Yes">
<AddNewRowDefault Visible="No">
</AddNewRowDefault>
BorderStyle="Solid" BorderWidth="1px" Font-Names="Microsoft Sans Serif"
Font-Size="8.25pt" Height="275px" Width="420px">
</FrameStyle>
BeforeRowUpdateHandler="grdBspCompanys_BeforeRowUpdateHandler"
CellClickHandler="grdBspCompanys_CellClickHandler">
</ClientSideEvents>
<ActivationObject BorderColor="" BorderWidth="">
</ActivationObject>
</DisplayLayout>
</igtbl:UltraWebGrid>
And before you ask my Skin file is just a stylistic setting for all our grids, we do not actually set and DisplayLayout properties in the skin.
how did u solve it?
I would like to also note that I initialize these columns from code behind after the data has been binded to the grid.