How to hide a coloumn of the listview

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I'd like to know how to hide a column of the listview control. anybody gives
a hand?

Thanks in advance
 
* "=?Utf-8?B?TGkgUGFuZw==?= said:
I'd like to know how to hide a column of the listview control. anybody gives
a hand?

Don't add the column and store the data in your 'ListViewItem's' 'Tag'
property instead.
 
Hi,

Set its width to 0

DirectCast(ListView1.Columns.Item(2), ColumnHeader).Width = 0



Ken

--------------------------------------

Hi,

I'd like to know how to hide a column of the listview control. anybody gives
a hand?

Thanks in advance
 
There's one problem setting the width to 0 if you have the columns as
resizable. You or a user of your app could resize the column to make it
visible again which might not be very pretty if you are using that column to
store some sort of ID for each row in your listview. I would go with
Herfried's idea of using the 'Tag' property and use it to identify each row.

Imran.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top