3 Answers, 1 is accepted
0

Princy
Top achievements
Rank 2
answered on 16 Oct 2009, 05:32 AM
Hello Jignesh,
You can try out the following code to right align numeric columns:
c#:
Thanks
Princy.
You can try out the following code to right align numeric columns:
c#:
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) |
{ |
foreach(GridColumn col in RadGrid1.MasterTableView.Columns) |
{ |
if (col.ColumnType == "GridNumericColumn") |
{ |
col.ItemStyle.HorizontalAlign = HorizontalAlign.Right; |
} |
} |
} |
Thanks
Princy.
0

Ron Carlton
Top achievements
Rank 1
answered on 19 May 2010, 10:17 PM
This solution does not work for me at all.
0

Shinu
Top achievements
Rank 2
answered on 20 May 2010, 08:26 AM
Hello Ron,
You can also change the alignment of column by setting the HorizontalAlign property of column in ASPX. Try with the following approach and see whether it helps you.
ASPX:
Regards,
Shinu.
You can also change the alignment of column by setting the HorizontalAlign property of column in ASPX. Try with the following approach and see whether it helps you.
ASPX:
<telerik:GridNumericColumn DataField="EmployeeID" HeaderText="NumericEmployeeID 1" |
UniqueName="EmployeeID1"> |
<HeaderStyle HorizontalAlign="Right" /> |
<ItemStyle HorizontalAlign="Right" /> |
</telerik:GridNumericColumn> |
Regards,
Shinu.