Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datagrid and listbox query

Status
Not open for further replies.

GlenLynam

MIS
Jul 26, 2002
121
Hi i have a couple of questions regarding the above....

Firstly how can i make it so that i can make multiple selections in a data grid? With this multiple selection how do i then populate all these into a listbox and finally i need to know how to get both columns from the datagrid into the listbox? Actualy that was 3 q's.

Thanks in advance for any help offered with this, sorry if these are easy q's im a network admin trying to save some money, and havent done VB for about 5 years!

Regards

Glen
 
You're not going to have much luck getting more than one column into the listbox (unless you have a third-party listbox control with multi-column support).

Im not really as familiar with the DataGrid as I am with a Listview so Im not really able to answer the other 2 questions. I know you will need to have a loop of sorts to cycle through the items in the Datagrid, and find the selected rows.
 
1. Look at MSFlexgrid
2. Loop through the rows checking for Selected
3. If you want to use a std Listbox you can (sort of) get 2 columns by using a tab separator - otherwise use a ListBox from FM20.DLL. Do a search on this forum for caveats re: distribution of the DLL

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'If we're supposed to work in Hex, why have we only got A fingers?'
Essex Steam UK for steam enthusiasts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top