Windows Develop Bookmark and Share   
 index > Windows Forms Sample Applications > Custom control in a column of a Listview
 

Custom control in a column of a Listview

Hi,

I want to have some customized controls in a column of a Listview control (of course when the view is set to deyails). The custome control might be a comboBox or some images or a textbox.

Thanks in advance.

Kundan
Kundan3  Wednesday, May 11, 2005 2:15 PM
The ListView control does not support hosting arbitrary controls.  From the description of your scenario, it sounds like the new DataGridView control might be a better fit for your needs.

 - mike
Mike Harsh  Thursday, May 12, 2005 5:18 PM
The ListView control does not support hosting arbitrary controls.  From the description of your scenario, it sounds like the new DataGridView control might be a better fit for your needs.

 - mike
Mike Harsh  Thursday, May 12, 2005 5:18 PM
Hi all
I'm interested in the same subject as I needed to add some controls to the columnHeaders of the listview. I had made some success in that but with problems. First I increased the height of the columnHeader by using the sendmessage API to retrieve the handle of the columnHeader using the (LVM_GETHEADER) then calling the SetWindowPos to change the height. then I used the listview.controls.add to add the controls I need (ComboBox) and I resized each to fit the column it represents till now every thing is OK but the problems I face are
1- I need to handle the column resize which I have no event for
2- the Headers do not redraw properly after filling the listview (even if I did that after the filling)
3-The Text of the columnHeader horizontal alignment is always in the middle

I hope this may help you.
Eisa  Monday, June 06, 2005 8:02 AM

You can use google to search for other answers

Custom Search

More Threads

• I need help with a load button
• Make a Master-Detail form in VB.Net.
• Is it dead?
• Msn mesennger troughput isa server 2004
• Where can i get sample applications?
• Work Items
• unable to install TaskVision in Windows 2000 Advance Server
• using n-tier architecture for winforms
• update terminates without updating
• Terrarium Servers Back Up!