We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Strange right alignment of Cells in the PdfGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

98494 Mar 4,2011 07:53 AM UTC Mar 9,2011 07:03 AM UTC WPF 5
loading
Tags: PDF
Jon Andersen
Asked On March 4, 2011 07:53 AM UTC

Hi!

I'm using a PdfGrid to render a report and I'm experiencing some problems with the alignment of the cell-text.


My scenario:

The grid's cellpadding and cellspacing:

pdfGrid.Style.CellPadding = new PdfPaddings(0.5f,5f,0.5f,0.5f);
pdfGrid.Style.CellSpacing = 0;


The Cell's alignment:

pdfGrid.Rows[i].Cells[0].StringFormat.Alignment = PdfTextAlignment.Right;


The problem is now that the text is not aligned on a strait line to the right, but it looks like the length of the text in each cell affects the right alignment position.

I've included both a screen dump pointing out the problem, and the PDF document itself.

Any ideas?

Thanks!

Best regards
Jon




Strange_Right_Alignment_79932273.zip

Geetha M [Syncfusion]
Replied On March 7, 2011 08:46 AM UTC

Hi Jon,

Thank you for your interest in Syncfusion products.

I am afraid that I am not able to reproduce the problem with v9.1.0.20. I have placed the test sample in the following link:

F98494-1480644348.zip

Could you please try running it and if you still see the problem, send me the modified sample so that I can check and get back to you?

Regards,
Geetha


Jon Andersen
Replied On March 7, 2011 02:48 PM UTC

Hi Geetha!

I think I have found where the problem is.

When the numbers in the cells have different numbers of thousand seperators, the alignment is beeing messed up.

For instance, if the grid contains both 1 239,39 and 123 230 239,92. These numbers are not right align correctly.

(In my culture (Norwegian) we have a small space as Thousand seperator (not comma, as in US-culture).


I have modified your example to highlight the issue (remember to set the CultureInfo to for example Norwegian).

Thanks,

Jon



F98494_f137f6ea.zip

Geetha M [Syncfusion]
Replied On March 8, 2011 06:53 AM UTC

Hi Jon,

Thank you for the details.

I was able to reproduce the problem under Norwegian culture. Could you please create a new direct trac incident so that we can keep you posted with the further details of the problem?

Regards,
Geetha


Jon Andersen
Replied On March 8, 2011 08:36 AM UTC

Thanks!

I've created an incident as you requested.

Id 78074.

Hoping for the 2011 v3 release :-)

Cheers,
Jon


Geetha M [Syncfusion]
Replied On March 9, 2011 07:03 AM UTC

Hi Jon,

Thank you for the update.

Regards,
Geetha


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;