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

Numeric column right alignment

6 Answers 178 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Hari
Top achievements
Rank 1
Hari asked on 09 Dec 2011, 11:49 AM
Hi,
I have a Custom Grid interited from Telerik Grid. AutoGenerateColumns is false. I want the numeric columns that get binded at runtime to be aligned to right. Please help

6 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 12 Dec 2011, 09:01 AM
Hi Hari,

 
You may set the TextAlignment property to Right for the numeric columns to achieve your goal. 


Kind regards,
Vanya Pavlova
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Hari
Top achievements
Rank 1
answered on 14 Dec 2011, 05:28 AM
Hi,
I dont want to be doing this at every place. I want to make this change only at one place and that is in my custom grid.
0
Accepted
Vanya Pavlova
Telerik team
answered on 14 Dec 2011, 02:28 PM
Hello Hari,


 
The TextAlignment property is a column related setting, not a RadGridView one.
You want to right align only the numeric columns you may use this property or to define a cell style for these particular columns. 
Indeed using this property is the easiest way to achieve this result for the numeric columns. 



Greetings,
Vanya Pavlova
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Sk
Top achievements
Rank 1
answered on 18 May 2013, 06:14 AM
hi.....

I have also a query like this but i have auto generate columns true,then how can i set the numeric columns to the right align?

Please  suggest...................
0
Vanya Pavlova
Telerik team
answered on 18 May 2013, 06:50 AM
Hello Sk,


You can handle AutoGeneratingColumn event of RadGridView and from there you may set the desired TextAlignment for your columns. Please check the following help article for further reference.



Kind regards,
Vanya Pavlova
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Sk
Top achievements
Rank 1
answered on 18 May 2013, 07:12 AM
Hiiii,

Thanks for u reply...  :)
But i have the other requirements for keeping auto generate columns true, i just want that with auto generate columns true property how can i align the columns with numeric values to right side??????

i have put this issue on following link also :
http://www.telerik.com/community/forums/aspnet-ajax/grid/column-alignment-to-the-left.aspx#2626798

Please suggest............

Thnaks



Tags
GridView
Asked by
Hari
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Hari
Top achievements
Rank 1
Sk
Top achievements
Rank 1
Share this question
or