DetailView column alignment

2 posts, 0 answers
  1. Patrick
    Patrick avatar
    7 posts
    Member since:
    Jul 2011

    Posted 01 Mar 2013 Link to this post

    When binding the RadListView, I'm using the ColumnCreating to provide custom column header text and set the column width.  What I do not see as a property of e.Column is an alignment property.  How can I set the alignment of the columns?

    Thanks for your advice.
  2. Stefan
    Stefan avatar
    2891 posts

    Posted 04 Mar 2013 Link to this post

    Hi Patrick,

    Thank you for writing.

    To change the alignment of the cells in RadListView, you should use the CellFormatting event:
    void radListView1_CellFormatting(object sender, ListViewCellFormattingEventArgs e)
        e.CellElement.TextAlignment = ContentAlignment.MiddleRight;

    I hope that you find this information useful.

    the Telerik team
    WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Join us for a FREE webinar to see all the new stuff in action.

    Interested, but can’t attend? Register anyway and we’ll send you the recording.
  3. DevCraft R3 2016 release webinar banner
Back to Top