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

Center Header Columns in the designer with no items

1 Answer 50 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Colin
Top achievements
Rank 1
Colin asked on 22 May 2012, 09:33 PM
Hi guys,

I'm trying to find out how to center headers.

if I create columns number, name, other, then they appear left justified in the designer.

I want them centered.

I can center in code when there are databound items.  I just can't find out how to center the headers in design mode with no items!!!

Colin.

1 Answer, 1 is accepted

Sort by
0
Ivan Todorov
Telerik team
answered on 25 May 2012, 06:49 AM
Hi Charles,

Thank you for contacting us.

Currently, the columns in RadListView are always arranged starting from the left edge (or the right edge in RightToLeft mode). In your case, you can either justify the columns so that they fill the entire available space or you can use the Padding property of ListViewElement to center the view inside the visible area. I have prepared a small sample project which demonstrates both approaches and I am attaching it to this message. Please refer to it for additional details.

I hope this will help you. Do not hesitate to write back in case you have any additional questions.

Greetings,
Ivan Todorov
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Tags
ListView
Asked by
Colin
Top achievements
Rank 1
Answers by
Ivan Todorov
Telerik team
Share this question
or