This is a migrated thread and some comments may be shown as answers.

RadComboBox & JSON, Grouping options ?

2 Answers 86 Views
UI for ASP.NET AJAX in ASP.NET MVC
This is a migrated thread and some comments may be shown as answers.
Laurent Fabre
Top achievements
Rank 2
Laurent Fabre asked on 17 Dec 2009, 06:38 PM
Hi Gang,

I've implemented the solution documented on one of your blog to load on demand the RadComboBox with a MVC JSON request. 

I'm having a hard time trying to figure out if and how I can group entries server side (or even on the client).

Any help would be greatly appreciated :)

Regards,

LF

2 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 18 Dec 2009, 03:11 PM
Hello Laurent Fabre,

I guess that by grouping you mean using separator items as shown here. If yes this can be achieved in mvc as well:
  1. On the server side you need to set a custom attribute of the items which should be separators:
    item.Attributes["separator"] = true;
  2. On client side use the OnClientItemDataBound event to make the item a separator:
    function onItemDataBound(sender, args)
    {
          var item = args.get_item();
          if (item.get_attributes().getAttribute("separator"))
          {
                 item.set_isSeparator(true);
          }

    }

Regards,
Atanas Korchev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Laurent Fabre
Top achievements
Rank 2
answered on 19 Dec 2009, 06:05 AM
It worked. Marvelous :)

Thanks.

LF
Tags
UI for ASP.NET AJAX in ASP.NET MVC
Asked by
Laurent Fabre
Top achievements
Rank 2
Answers by
Atanas Korchev
Telerik team
Laurent Fabre
Top achievements
Rank 2
Share this question
or