Passing radComboBoxContext to client

4 posts, 0 answers
  1. Vladimir
    Vladimir avatar
    5 posts
    Member since:
    Sep 2012

    Posted 11 May 2011 Link to this post

    Hello.
    I have a question if there is some way to pass some information from server WCF to client combobox object. for example using RadComboBoxData.Context.

    The situation is^ combobox populated with two queries in single WCF method.
    I want to know how match items werel loaded by each query, to use this information in "show more" to organize some kind of paging.
    var result = new RadComboBoxData();
    result.Context["users"] = context.ContainsKey("users") ? Convert.ToInt32(context["users"]) : 0 + userList.Count();
    result.Context["contacts"] = context.ContainsKey("contacts") ? Convert.ToInt32(context["contacts"]) : 0 + userList.Count();
    return result;

    But there is no "users" and "contacts" keys in second request, only standart text and numberOfItems.
    Is there anything I've missed?

    Thanks

  2. Helen
    Admin
    Helen avatar
    1052 posts

    Posted 13 May 2011 Link to this post

    Hi Vladimir,

    Did you review the following help article?
    You may subscribe to the onClientRequesting event and access the RadComboBoxData.Context trough the arguments:

    function onClientRequesting(sender, e)
        {       
            var context = e.get_context();       
              .............
        }


    Kind regards,
    Helen
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. Vladimir
    Vladimir avatar
    5 posts
    Member since:
    Sep 2012

    Posted 13 May 2011 Link to this post

    How I can get on client, something came from the server?
    What event should be subcribed?
  4. Helen
    Admin
    Helen avatar
    1052 posts

    Posted 13 May 2011 Link to this post

    Hi Vladimir,

    Actually it is not possible. Did you review our paging example for RadComboBox Load On Demand:

    http://www.telerik.com/community/code-library/aspnet-ajax/combobox/paging-in-radcombobox-load-on-demand.aspx


    Greetings,
    Helen
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top