0
  • I have a data as below :

GROUP_CODE GROUP_NAME LEVEL

1 test1 1

2 test2 1

11 test11 2

12 test12 2

13 test13 2

111 test111 3

112 test112 3

1111 test1111 4

  • So i want to display with @Html.DropDownList as below :

test 1

   test11

        test111

                test1111

        test112

   test12

   test13

test2

Please help me to find solution ! Thank you !

  • Option groups will allow you to display grouped data but not hierarchical data. Select controls are rendered by the browser and you have very little control over the formatting. You will need to use a jquery plugin for this (or write your own) –  Dec 19 '14 at 07:51
  • @Stephen : Thanks for your reply. Do you know any plugin for this problem ? – man_in_black Dec 19 '14 at 08:52
  • I have my own. [Refer article here](http://www.codeproject.com/Articles/768069/MVC-Custom-Select-Control) but not doubt google will help you find others –  Dec 19 '14 at 08:59
  • @StephenMuecke : Thanks so much. I will try to use this plugin, if any i will ask to you. – man_in_black Dec 22 '14 at 06:48
  • No problem. If you have any questions ask them on CodeProject. Note there is a minor bug in the code and I'll be doing an update in the new year. –  Dec 22 '14 at 06:51

0 Answers0