To add Listview in Combobox COntrol (Urgent)

Hema Rawat

Member
Joined
Dec 12, 2005
Messages
24
Location
India
Programming Experience
1-3
Hi all,
I want to add the ListView Control in the Combobox control of vb.net
as I want to show the multiple columns in the combo box
SO I want to achieve this functionality with list view
AS the user Click on down arrow of Combo Box
that will show the listview


populateListView()
Me
.ComboBox1.Controls.Add(listview1)

But I am Not Successful

Its very urgent for me

I will highly appreciate Any help

Thanks in advance

 
You cannot just add a ListView as an item and expect it to be displayed. The items in a ComboBox are displayed as strings so your ListView will just have its ToString method called to create a string to display. If you want to show multiple columns in the drop-down list then you have to do a lot more work than that. Here's a couple of examples.

http://www.codeproject.com/vb/net/multicolumncombo.asp
http://www.codeproject.com/vb/net/MultiColumnFlatCombo.asp


I have actually seen a ComboBox that replaces the drop-down list with a ListView but I can't remember where. I believe that it wasn't free anyway.
 
Thanks for reply

But I have seen these all links of multiColumnComboBox
They are not working with my datagrid

The link which u suggest has the limitation that it limits the Column Numbers (Only 4) for the MultiCOlCombo

http://www.codeproject.com/vb/net/MultiColumnFlatCombo.asp[^]

So I want to generate my own Control
So that that control can be embed with datagrid.

I think Controls may be can't added with the DatagridTextBoxColumn
I m right/not????????



Hema Chaudhry
 
Back
Top