When exporting a grid to PDF, the columns are losing formatting of alignment. We have a column that we setup the CSSClass to align to the right, When
CssClass
="igg_ItemRAlign",
.igg_ItemRAlign
{
text-align:right !important;
}
When exporting to PDF, only every other row is aligned to the right, the rest are left aligned which is the default for our CssClass for the grid. Is this a bug or is there a workaround to this?
Hello Jabof,
I tested this with the latest service release of 10.3 version (10.3.20103.2056)
http://samples.infragistics.com/2010.3/WebFeatureBrowser/contents.aspx?showCode=true&t=WebDataGrid/Exporters/WebDataGrid_DocumentExport.aspx~srcview.aspx?path=~srcview.aspx?path=WebDataGrid/Exporters/WebDataGrid_DocumentExport.src
<style type="text/css">
text-align: right !important;
</style>
<ig:BoundDataField DataFieldName="ProductName" Key="ProductName" Width="200px" CssClass="igg_ItemRAlign">
<Header Text="ProductName" />
</ig:BoundDataField>
I was not able to encounter the issue.
Can you please share an isolated sample reproducing the issue?
Hope hearing from you
Tsvetelina, very easy to reproduce. Attached is a very very very simple example. FYI, in the meantime, I have found that if you move the CSS style outside of the infragistics folders, it works properly. I had originally defined my class in the ig_dataGrid.css.
Hello Jaboof,
This issue happend because you have modified only the ItemCssClass class.
You should modify the AltItemCssClass class.
Please refer to the below article for more information.
http://community.infragistics.com/blogs/engineering/archive/2010/08/25/webdatagrid-css-styling-guide.aspx
tbody>tr.igg_Alt_RAlign>td
<ig:BoundDataField DataFieldName="LIMIT_VALUE" Key="LIMIT_VALUE" Width="100px" CssClass="igg_Alt_RAlign" >
<Header Text="Count/Amount" />
Please let me know if you need further assistance regarding this.
Tsvetelina,
I am attaching anothe project duplicating the issue in a different scenario. In this example, I have changed the CSSCLASS of a cell, based on a conditional argument in initialize row event. This class style is displayed in the grid but is not carried forward to the PDF. This is again, a simplistic version of a real life project. As soon as you assign a cssclass to an individual cell, this style never seems to make it to the PDF file. Any insight?