This is a migrated thread and some comments may be shown as answers.

[Solved] pdf export problem

1 Answer 167 Views
Grid
This is a migrated thread and some comments may be shown as answers.
sabarishbabu
Top achievements
Rank 1
sabarishbabu asked on 10 Nov 2009, 10:25 AM
Hi,

 while exporting to pdf, column alignment  is not clear,  the alignment always defaults to left for items and centre for headers.

 GridItem[] dataItems = grid.MasterTableView.GetItems(GridItemType.Item);



                    // Apply some css style to the data items

                    foreach (GridItem item in dataItems)
                    {

                        foreach (TableCell cell in item.Cells)
                        {



                            cell.Style["text-align"] = "center";

                            cell.Style["vertical-align"] = "middle";

                         

                        }

                    }
 foreach (TableCell cell in headerItem.Cells)
                    {

                       

                        cell.Style["text-align"] = "center";

                        cell.Style["vertical-align"] = "middle";

                      

                    }

even i  put the coding as like above, it does not affected the document,
actually i set ignore paging =true.If i set it as false, it is reflected the changes in pdf

But i have to  set  ignorepaging = true

please help me how to align the columns while exporting to pdf with setting ignorepaging = true.


Thanks for any help

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 10 Nov 2009, 03:00 PM
Hi Sabarishbabu,

The desired functionality is demonstrated in the projects from the following public forum post:
http://www.telerik.com/community/forums/aspnet-ajax/grid/export-to-pdf-column-alignment.aspx

Regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
sabarishbabu
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or