RadComboBox & JSON, Grouping options ?

Thread is closed for posting
3 posts, 1 answers
  1. Laurent Fabre
    Laurent Fabre avatar
    28 posts
    Member since:
    Apr 2009

    Posted 17 Dec 2009 Link to this post

    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. Answer
    Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 18 Dec 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Laurent Fabre
    Laurent Fabre avatar
    28 posts
    Member since:
    Apr 2009

    Posted 19 Dec 2009 Link to this post

    It worked. Marvelous :)

    Thanks.

    LF
Back to Top