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

DetailView column alignment

1 Answer 318 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Veteran
Patrick asked on 01 Mar 2013, 06:47 PM
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.
Regards,
Patrick

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 04 Mar 2013, 01:40 PM
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.
 

Regards,
Stefan
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.
Tags
ListView
Asked by
Patrick
Top achievements
Rank 1
Veteran
Answers by
Stefan
Telerik team
Share this question
or