Strange right alignment of Cells in the PdfGrid
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
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
SIGN IN To post a reply.
5 Replies
GM
Geetha M
Syncfusion Team
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
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
JA
Jon Andersen
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
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
GM
Geetha M
Syncfusion Team
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
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
JA
Jon Andersen
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
I've created an incident as you requested.
Id 78074.
Hoping for the 2011 v3 release :-)
Cheers,
Jon
GM
Geetha M
Syncfusion Team
March 9, 2011 07:03 AM UTC
Hi Jon,
Thank you for the update.
Regards,
Geetha
Thank you for the update.
Regards,
Geetha
SIGN IN To post a reply.
- 5 Replies
- 2 Participants
-
JA Jon Andersen
- Mar 4, 2011 07:53 AM UTC
- Mar 9, 2011 07:03 AM UTC