Using FullRowSelect at ListView control in

Hakan used Ask the Experts™
I'm using listview as WinForm control in my application. I'm using a single column list type but the problem is FullRowSelect property doesn't work with my application.

listView1.FullRowSelect = true

Open in new window

Does anyone has experience how can i use FullRowSelect feature?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

There are a few details you should think about when using FullRowSelect:

1. The View-property has to be set to 'Details'
2. The width of the column (or total width of all the columns) should be the width of your ListView.

There is no setting that will do that for you, you will have to do the calculations yourself.
FullRowSelect is depended upon the View property of the ListView -
The FullRowSelect property has no effect unless the View property of the ListView control is set to Details. The FullRowSelect property is typically used when a ListView displays items with many subitems and it is important to be able to see selected items when the item text is not visible due to horizontal scrolling of the control's contents. - Source
AndyAinscowFreelance programmer / Consultant

>>I'm using a single column list type

I have a feeling you might be confusing 'Full Row Select' with 'Hide Selection' properties.  Full Row Select shows all items AND sub items (and you don't have any sub items with just one column) as selected when the ListView has the focus.  Setting the 'Hide Selection' property to false will show what is selected in the ListView even when another control has the focus.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial