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

Align summary rows

2 Answers 97 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Zensell
Top achievements
Rank 1
Zensell asked on 22 Sep 2009, 02:29 PM
Hello, is there a way to align values in summary rows? I have tried with FormatString = {0,10} but it is still centering the values. Thanks.

2 Answers, 1 is accepted

Sort by
0
Accepted
Jack
Telerik team
answered on 24 Sep 2009, 06:20 AM
Hello Zensell,

Yes, you can do this when handling ViewCellFormatting event. You should set the TextAlignment property of GridCellElement. Please look at the sample below:

void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e) 
    if (e.CellElement.RowInfo is GridViewSummaryRowInfo) 
    { 
        e.CellElement.TextAlignment = ContentAlignment.MiddleRight; 
    } 

Should you have any other questions, we will be glad to assist you.

Best wishes,
Jack
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Fakhru
Top achievements
Rank 2
answered on 24 Sep 2009, 12:06 PM
Thx, I'm glad that I read this thread before I post similar question.
Tags
GridView
Asked by
Zensell
Top achievements
Rank 1
Answers by
Jack
Telerik team
Fakhru
Top achievements
Rank 2
Share this question
or