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

RTL Direction for Numeric Columns..

3 Answers 39 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jignesh
Top achievements
Rank 1
Jignesh asked on 15 Oct 2009, 04:34 PM
Hi  there

Can I set some of the columns in grid to be Right Align..like all numeric columns to be right align?
and how?

3 Answers, 1 is accepted

Sort by
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#:
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:
<telerik:GridNumericColumn DataField="EmployeeID" HeaderText="NumericEmployeeID 1" 
                        UniqueName="EmployeeID1"
     <HeaderStyle HorizontalAlign="Right" /> 
     <ItemStyle HorizontalAlign="Right" /> 
</telerik:GridNumericColumn> 




Regards,
Shinu.

Tags
Grid
Asked by
Jignesh
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Ron Carlton
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or