Link to home
Start Free TrialLog in
Avatar of chadmanvb
chadmanvb

asked on

populate a listview with data from a datagridview

I have a datagridview that works, but want to use a list view instead.  How can I convert my datagrid view into my listview with .net 2.0 visual basic.
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

How is the grid being populated? Using a datatable/dataset? Use it as a datasource of the list and set display/value members.
Avatar of chadmanvb
chadmanvb

ASKER

Actually  I just need to populate a listview from a sql query. That looks like Select * From dbo.Workstations where DateDiff(second, CHECKTIME, getdate()) <= 30.

I need to use that data to populate a listview, but only want to populate 3 columns from the query called SERIAL, NAME,TYPE.
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That worked.