Click to See Complete Forum and Search --> : ComboBoxes in a ListBox


jusstujoo
August 15th, 2006, 01:03 AM
Hello All:

I was just wondering if i can Add a ComboBoxes in a ListBox with Multiple rows and columns. I would like to add as many ComboBoxes as the number of rows in a listBox.

Thanks...

thelinuxduck
August 15th, 2006, 10:26 AM
AFAIK, this is not possible. I have looked into doing something similar which uses not just text but also images in a column of a ListBox, but haven not found any way to easily do this. The only solution that I can conceive involves using a Panel as a fake ListBox and building a mock ListBox on the fly with placed Controls. It would be some work to accomplish, but I think doable.

Anyone else know of any other solutions?

jusstujoo
August 16th, 2006, 01:06 AM
AFAIK, this is not possible. I have looked into doing something similar which uses not just text but also images in a column of a ListBox, but haven not found any way to easily do this. The only solution that I can conceive involves using a Panel as a fake ListBox and building a mock ListBox on the fly with placed Controls. It would be some work to accomplish, but I think doable.

Anyone else know of any other solutions?

Thank you thelinuxduck... i appreciate your reply.

Attached is an screen shot that i captured from VisualStudio.Net.

I would like to have something similar to the attached screenshot.

Actually, I am mapping tables and fields of one database(lets say DB1) to tables and feilds of another database(DB2).

DB1 has static values, DB2 has runtime values, and the database could be anything and could contain any number of fields. So, I was thinking if can have somthing similar to this screenshot, then I may be able to load the fields on DB1 in column 1 and provide a ComboBox in Column2. Clearly, the ComboBox in Column2(of the attached screenshot) will hold the fields from DB2.

Any ideas, workarounds, links, etc... will be highly appreciated.

Thanks,

thelinuxduck
August 16th, 2006, 10:34 AM
You might look into the User Control. It allows you to build a custom control out of all the provided controls, and then use it on a form just like any other control. You might be able to put a static label/text box for the static item in DB1, and then a combo box for the dynamic item in DB2. Then, just add as many of the new control as you need on the form.

May be something to investigate.

jusstujoo
August 17th, 2006, 03:55 AM
Thank you thelinuxduck. I appreciate your replies.

Actually, I found that DataGrid Control offers this task. It requires a bit coding in .Net 1.1, but its easiest to add combos in DataGrid in .Net 2.0.

Well, I am still looking into the examples. One I found good is http://www.codeproject.com/cs/miscctrl/WindowsDataGridColumns.asp

Do take a look at it, and If you can help me with your comments.

Now, my question is, How would I know the version of my .Net. And from where do I get the .Net 2.0?

Thanks

klintan
August 17th, 2006, 05:44 AM
The image you showed is a PropertyGrid, such a control exists in .Net 1.1 already (but you have to add it to the tool box though).

hspc
August 17th, 2006, 09:09 AM
Now, my question is, How would I know the version of my .Net.
the easiest way is to open Administrative Tools
check the existance of:Microsoft .NET Framework 1.1 Configuration
Microsoft .NET Framework 2.0 Configuration



And from where do I get the .Net 2.0?
Get framework from
Microsoft .NET Framework Version 2.0 Redistributable Package (x86) (http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&displaylang=en)

Also check visual studio express editions:
http://msdn.microsoft.com/vstudio/express/

jusstujoo
August 19th, 2006, 03:09 AM
The image you showed is a PropertyGrid, such a control exists in .Net 1.1 already (but you have to add it to the tool box though).
Thank you, can you tell me the name of control so that I may be able to add the control?

the easiest way is to open Administrative Tools
check the existance of:Microsoft .NET Framework 1.1 Configuration
Microsoft .NET Framework 2.0 Configuration



Get framework from
Microsoft .NET Framework Version 2.0 Redistributable Package (x86) (http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&displaylang=en)

Also check visual studio express editions:
http://msdn.microsoft.com/vstudio/express/

Thank you HSPC:
I just downloaded and installed the .Net 2.0. But How am I supposed to tell my VisualStudio.Net 2003 to stop using 1.1 and Start using .Net 2.0?

hspc
August 19th, 2006, 04:13 AM
I just downloaded and installed the .Net 2.0. But How am I supposed to tell my VisualStudio.Net 2003 to stop using 1.1 and Start using .Net 2.0?

AFAIK, VS 2003 does not support .NET 2.0, Only 1.0,1.1 but they can run side by side..
You should upgrade to VS2005 or use the free express editions (I use them and they are good)

jusstujoo
August 19th, 2006, 05:06 AM
Thank you HSPC. For you response. I am downloading the Setup. Lets see.