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

Summary Row Alignment

1 Answer 344 Views
GridView
This is a migrated thread and some comments may be shown as answers.
ahmed almousa
Top achievements
Rank 1
ahmed almousa asked on 29 Aug 2010, 11:21 AM
Hi,

I have added summary row total in my grid but I am not getting it aligned in anyway. I have tried by following method

private void rgvFinancials_ViewCellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
        {
            if (e.CellElement is Telerik.WinControls.UI.GridSummaryCellElement)
            {
                                             
                e.CellElement.Alignment = ContentAlignment.MiddleRight;
                e.CellElement.UpdateLayout();
            }
        }

I tried by commenting and uncommenting following statement also:

                e.CellElement.UpdateLayout();

But there is no effect on the cells of summary row.

Please guide me how can I align text in the summary row cells.

Regards,

Ahmed Almousa

1 Answer, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 30 Aug 2010, 09:29 PM
Hello ahmed almousa,

Thank you for this question.

The UpdateLayout is not needed in this case. In fact it can only slow down your application. We do not recommend calling this method directly. You should set the TextAlignment property when changing the text alignment. Please replace the Alignment property with TextAlignment and your code should work. 
 
In case you have any further questions, please do not hesitate to write me back.

Best wishes,
Jack
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
ahmed almousa
Top achievements
Rank 1
Answers by
Jack
Telerik team
Share this question
or