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

Grid ItemStyle position not working!

3 Answers 92 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Adam Hubble
Top achievements
Rank 1
Adam Hubble asked on 29 Jun 2009, 10:10 AM
Hi,

RadGrid is refusing to apply the property ItemStyle HorizontalAlign="Center" / ItemStyle-HorizontalAlign="Center", no matter where I specify the property in the markup, it always ignores it and the text is still left aligned. I have also tried applying css class to gridboundcolumns with text-align:center !important; and this has no effect either.

This only appears to be happening since upgrading to 2009, does anyone know why I cannot get the dataitems to align in center? Is there a solution?

Thanks,
Matt

3 Answers, 1 is accepted

Sort by
0
Accepted
Pavlina
Telerik team
answered on 29 Jun 2009, 01:24 PM
Hi Matt,

I followed your scenario in order to replicate the issue you are facing but to no avail. Please find attached a simple runnable application which handles the desired functionality and let me know what is the difference in your case.

Greetings,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Adam Hubble
Top achievements
Rank 1
answered on 29 Jun 2009, 01:36 PM
Pavlina, sorry but the problem appears to have been caused by our 'browser-reset' stylesheet, where td was set to left align. Your example helped me to isolate the problem.

For future refence, do you know which style is created by horizontal align="center"? It might be better if we were able to apply an !important attribute to this style.

Thanks,
Matt
0
Pavlina
Telerik team
answered on 30 Jun 2009, 03:12 PM
Hello Matt,

You can find more information about RadGrid styles in the following articles:
Customizing row appearance
Dimo Dimov's blog

Kind regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Adam Hubble
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Adam Hubble
Top achievements
Rank 1
Share this question
or