hello,
i've been using infragistics v6.2 for couple years and decided to upgrade to v8.2
One of the issues is that it looks like css styles defined in the aspx definition, are no longer making it to the table cells outputed by the grid. I am looking at it using IE Developer and not seeing the css classes set anywhere. The older version (6.2) actually added RowStyleDefault.CssClass (defined below) to the cell class attribute. This is no longer the case with new grid, and it breaks all our existing grids. Why would this change be made? What is the new property, or way, to set css class on a cell in the new grid ?
Here is my grid definition:
<Jef:PortalUltraWebGrid ID="PositionsGrid" runat="server">
<Bands> <igtbl:UltraGridBand AllowSorting="yes"> <Columns> ... </Columns> </igtbl:UltraGridBand> </Bands> <DisplayLayout BorderCollapseDefault="separate" AllowSortingDefault="Yes" CellClickActionDefault="Edit" AutoGenerateColumns="False" Name="TradesGrid" RowSizingDefault="fixed" RowSelectorsDefault="no" ViewType="flat" SelectTypeRowDefault="None" SelectTypeColDefault="None" SelectTypeCellDefault="None" TableLayout="Fixed" Version="4.00" RowHeightDefault="18" ScrollBar="Auto" ScrollBarView="vertical" AllowColSizingDefault="fixed"
AllowColumnMovingDefault="none" AllowDeleteDefault="no">
<EditCellStyleDefault CssClass="Webgrid-EditCell" />
<FixedCellStyleDefault CssClass="Webgrid-FixedCell" />
<FixedFooterStyleDefault CssClass="Webgrid-FixedFooter" />
<FixedHeaderStyleDefault CssClass="Webgrid-FixedHeader" />
<FormulaErrorStyleDefault CssClass="Webgrid-FormulaError" />
<FooterStyleDefault CssClass="Webgrid-FooterStyle" ></FooterStyleDefault>
<FrameStyle CssClass="Webgrid-FrameStyle" BorderColor="#bbbbbb" BorderStyle="solid" BorderWidth="1" />
<GroupByRowStyleDefault CssClass="Webgrid-GroupByRow" />
<HeaderStyleDefault CssClass="Webgrid-Header-NoPad"><BorderDetails /></HeaderStyleDefault>
<Pager />
<RowStyleDefault CssClass="Webgrid-Row"></RowStyleDefault>
<RowAlternateStyleDefault CssClass="Webgrid-RowAlternate"><BorderDetails StyleLeft="none" StyleTop="none" /></RowAlternateStyleDefault>
<RowExpAreaStyleDefault CssClass="Webgrid-RowExpArea" />
<RowSelectorStyleDefault CssClass="Webgrid-RowSelector" />
<SelectedHeaderStyleDefault CssClass="Webgrid-SelectedHeader" />
<SelectedRowStyleDefault CssClass="Webgrid-SelectedRow" />
<ImageUrls ExpandImage="/images/plus_beveled.gif" CollapseImage="/images/minus_beveled.gif" />
</DisplayLayout>
</Jef:PortalUltraWebGrid>
it looks like the css property is now applied only to the <tr> element.
I am aware that i could define my styles with TD indicator. but i am trying to avoid that because it is a horrible performance hit on browsers such as IE. because the way its css rendering engine appears to work is, it evaluates every single TD on the page and searches for style used in stylesheet. on a page with large tables this is a big hit in the amount of time a page is rendered. so i really need a way to add the style to the cells.
To get style information rendered to each cell, set the grid's DisplayLayout.OptimizeCSSClassNamesOutput property to False (infragistics.Web.UI.SharedDefaultableBoolean.False). This property was added in 2007 Volume 1, and when it's set to True (which I believe is the default), the CSS classes that apply to the whole row are actually rendered to the row.
Additionally, there were other breaking changes in 2007 Volume 1 with respect to how WebGrid handles CSS. Take a look at the "Breaking Changes for Multiple Controls" and "WebGrid" sections in the following article from our online help documentation for NetAdvantage for Web Client (ASP.NET) 2009 Volume 1:(Breaking Changes in) 2007 Volume 1
that is great, thanks for your reply.
So maybe i am doing something wrong, and you know of a better way. but when i set a CssClass containing attributes for font name, size, color, padding, overflow, and that class is set to the TR, table cells do not respect it.
so how is this css optimization supposed to be used? is appending a "td" after class name intended??
thanks.
disabled this property, and while cells are rendering almost as they were before, column headers are also getting row formatting it looks like.
why would you not make it backwards compatible by default.
wow!
i had to re-order css style definitions (as per page you provded) because regular row style is now added in the header and footer!!! so they have to be overwritten with their own styles basically.. what is the reason for this?????????
These changes make WebGrid's behavior more consistent with CSS styling principles in general. Further, the change was necessary as part of our introduction of Application Styling for our ASP.NET controls.