Combo Box Problem
Hi Everyone,
I am having a problem with a combobox in my application.
Actually I am trying to load the Groups from my groups table of my database to the combobox in order to give a selection combo for the parentgroup field in my database table.
My database table is like this:
Column Name | Type
GroupID | Int
GroupName| Varchar
ParentGroupID | Int
Now the problem is that I am able to add the names of the groups to the combobox using addItem method. But when I want to execute the insert query for inserting a new group in the database I am not able to get the GroupID of the selected group in combobox since my query is like this:
INSERT INTO Groups (GroupName, ParentGroupID) VALUES (value from GroupName textbox, GroupID of selected Group from ParentGroup Combobox)
Can someone help me to solve this problem. I tried but finally stuck when I found that combobox has no DataField and DisplayField as Combobox in VB, VB.NET or HTML have.
Please Help if someone knows the solution
Thanks in advance.
Regards
Devdatta

