Hi All,
I refered some websites, they are combinding two dropdown list values into single, but i don't know .Net will support it or not? If any body knows it plz tell me how to achieve it??
EX: Go to Naukri.com and select Functional Area dropdown list there u can see main & sub category names in one dropdown list!!!
Thanks,
Aswath.
![]() |
0 |
![]() |
hi just concatenate , or -
for ex:
Dropdownlist1.Datatextfield= maincategory & "," & Subcategory
Regards,
M.Venkatesan
My Blog : http://venkat-dotnetsamples.blogspot.com
Please remember to click “Mark as Answer” on the post that helps you,and to click “Unmark as Answer” if a marked post does not actually answer your question.
![]() |
0 |
![]() |
Hi,
Thanks for reply,
Your solution is ok, but i need exactly like Naukri.com Is it possible in .Net server controls??? For html controls "opgroup" property is available, but i need for server controls??
Thanks,
Aswath.
![]() |
0 |
![]() |
If you write sql query like
select main + ',' + sub from table
and if you bind the same to the drop down list you can get that.
Regards,
Ram Reddy Mekha, +91-994-840-4315
http://abhiramreddymekha.blogspot.com
Please Mark as Answer if the post helps you.
![]() |
0 |
![]() |
this is the way they are used..., try this..
wat does it means ie: optgroup ? Let me know clearly..
Regards,
M.Venkatesan
My Blog : http://venkat-dotnetsamples.blogspot.com
Please remember to click “Mark as Answer” on the post that helps you,and to click “Unmark as Answer” if a marked post does not actually answer your question.
![]() |
0 |
![]() |
Yes u r correct, It is "optgroup". If u know any thing abt this plz tell me....
Thanks,
Aswath.
![]() |
0 |
![]() |
Hi,
Based on your description, the issue is how to apply <optgroup> to the DropDownList control.
Usually, we achieve the goal by overriding the DropDownList control's RenderContents method.
The following articles cover this in detail. Please refer to it:
http://weblogs.asp.net/jeff/archive/2006/12/27/dropdownlist-with-optgroup.aspx
http://www.codeproject.com/KB/custom-controls/DropDownListOptionGroup.aspx
Forward Sun
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
![]() |
0 |
![]() |