*** ListView Items on one row - different columns 
Author Message
 *** ListView Items on one row - different columns



Quote:
> Hello everybody,

> In the ListView, how can I show more than one field in a row ?? When I
use the
> following:  

> lvwSelectedItems.ListItems.Add, , "FieldName"

> I get only one string in the row, which is "FieldName". So, how can I
make more
> than one item appear on one row ??

You have to put the ListView into Report view.  Then you have to add items
to the ListView's ColumnHeaders collection.  THEN, for each of your items,
you need to add items to the SubItems() collection.  It seems a bit
roundabout, but it makes sense.

You can either define your ColumnHeaders via the tab on the properties
window for the ListView, or you can create them programatically.

After you get this working, be sure to check out article #Q147666 in the
Microsoft knowledge base, which explains why setting the ColumnHeaders'
Width property doesn't work properly and gives an example of using the
Win32 API to fix it.

Bob Rossney



Sun, 02 Jan 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. *** ListView Items on one row - different columns

2. How to align different columns in ListView Items?

3. How to align different columns in ListView Items?

4. How to align different columns in ListView Items?

5. Error creating rows with columns having different column width

6. Listview Control - moving items from one listview to another

7. Different rows on one line CR 4.6 (or vb reporter - VB6)

8. Applying data to different column's in a ListView

9. Populate Listbox, DBlist or Datalist control with several columns in one row with ado

10. VB ListView Control - How to just display column lines - no row lines

11. ListView items with different back color

12. ListView controll: how to hide a column or save the rows record no

 

 
Powered by phpBB® Forum Software