Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 379
  • Last Modified:

Listbox is different from VB 6.0

I have been using Listbox in VB 6.0 and using its multicolumn property, we could use the Listbox to display information as in a table. But the current VB.Net Listbox control displays information as a continuation in the second column rather than as a table. Am I missing some property?

Is there any control which I can use to display information as in a table, on the form?

Regards,
Srinivas
0
srinivas_vemla
Asked:
srinivas_vemla
  • 6
  • 3
1 Solution
 
RonaldBiemansCommented:
the datagrid ?
0
 
RonaldBiemansCommented:
or the listview
0
 
RonaldBiemansCommented:
the listview is more like the vb6 listbox multicolumn format
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
srinivas_vemlaAuthor Commented:
Thanks Ronald for the quick comments...

I have tried using the DataGrid, but it displays table in a "tabular" fashion and I did not really like the way it displayed. I just wanted a display as in HTML <table> element.

I am not sure how to use the listview for this... any sample code or links????

Thanks,
Srinivas
0
 
RonaldBiemansCommented:
Is this a web or a windows app ?
0
 
RonaldBiemansCommented:
also the information you want to show, is this information in a table/dataset ?
0
 
srinivas_vemlaAuthor Commented:
This is a window app...

This information comes dynamically from my code... not the database... so I can put it in a DataTable...

0
 
RonaldBiemansCommented:
here is a small example (I know it doesn't sense but it is just an example) (just drag a listview from the toolbox onto your form)

        ListView1.View = View.Details
        ListView1.Columns.Add("col1", 20, HorizontalAlignment.Center)
        ListView1.Columns.Add("col2", 50, HorizontalAlignment.Center)
        ListView1.Columns.Add("col3", 60, HorizontalAlignment.Right)
        Dim x As ListViewItem
        x = ListView1.Items.Add("hallo")
        x.SubItems.Add("10")
        x.SubItems.Add("20")

if you need more specific information , just ask
0
 
srinivas_vemlaAuthor Commented:
Looks good...

Thanks Ronald... I will use the ListView...
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 6
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now