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

Passing radComboBoxContext to client

3 Answers 90 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Vladimir
Top achievements
Rank 1
Vladimir asked on 11 May 2011, 01:34 PM
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

3 Answers, 1 is accepted

Sort by
0
Helen
Telerik team
answered on 13 May 2011, 11:05 AM
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.

0
Vladimir
Top achievements
Rank 1
answered on 13 May 2011, 11:10 AM
How I can get on client, something came from the server?
What event should be subcribed?
0
Helen
Telerik team
answered on 13 May 2011, 02:30 PM
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.

Tags
ComboBox
Asked by
Vladimir
Top achievements
Rank 1
Answers by
Helen
Telerik team
Vladimir
Top achievements
Rank 1
Share this question
or