RadListView with single column - stretch to fit?

3 posts, 0 answers
  1. Lou
    Lou avatar
    64 posts
    Member since:
    Aug 2014

    Posted 15 Apr 2015 Link to this post


    I have a RadListView (ViewType = DetailView) that has a single column of data.

    I'd like to make this column take up 100% of the width of the RadListView. How would I do that?

    The design properties for the column only seem to allow a fixed pixel width (not percentage).



  2. Todor Vyagov
    Todor Vyagov avatar
    46 posts

    Posted 16 Apr 2015 Link to this post

    Hello Lou,

    Thank you for writing.

    To achieve the result you want you can set the width of the column to be equal to RadListView's Width. Also you need to subtract the BorderWidth.
    this.radListView1.Columns["MyColumn"].Width = this.radListView1.Size.Width - this.radListView1.ListViewElement.BorderWidth * 2;

    You can refer the following article for more information: Working with items.

    I hope you find this information useful.

    Todor Vyagov

    See What's Next in App Development. Register for TelerikNEXT.

  3. Lou
    Lou avatar
    64 posts
    Member since:
    Aug 2014

    Posted 16 Apr 2015 in reply to Todor Vyagov Link to this post

    Thanks for the help Todor.


Back to Top