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

RadListView with single column - stretch to fit?

2 Answers 104 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Lou
Top achievements
Rank 1
Lou asked on 15 Apr 2015, 06:14 PM

Hi,

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).

 Thanks,

 -Lou

2 Answers, 1 is accepted

Sort by
0
Todor Vyagov
Telerik team
answered on 16 Apr 2015, 07:59 AM
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.

Regards,
Todor Vyagov
Telerik
 

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

 
0
Lou
Top achievements
Rank 1
answered on 16 Apr 2015, 01:19 PM

Thanks for the help Todor.

 -Lou

Tags
ListView
Asked by
Lou
Top achievements
Rank 1
Answers by
Todor Vyagov
Telerik team
Lou
Top achievements
Rank 1
Share this question
or