Center Header Columns in the designer with no items

2 posts, 0 answers
  1. Colin
    Colin avatar
    1 posts
    Member since:
    Aug 2010

    Posted 22 May 2012 Link to this post

    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!!!

  2. Ivan Todorov
    Ivan Todorov avatar
    688 posts

    Posted 25 May 2012 Link to this post

    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.

    Ivan Todorov
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Back to Top