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

RadComboBox OnClientItemsRequesting Context Problem

1 Answer 212 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Kayhan
Top achievements
Rank 1
Kayhan asked on 10 Jan 2012, 03:12 PM
Hi All;

<script type="text/javascript">
 
        function ItemsRequesting(sender, args) {
            var context = args.get_context();
            context["FilterString"] = args.get_text();
            debugger;
        }
 
</script>

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js">
            </asp:ScriptReference>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js">
            </asp:ScriptReference>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js">
            </asp:ScriptReference>
        </Scripts>
    </telerik:RadScriptManager>
    <telerik:RadComboBox runat="server" ID="RadComboBox1" Height="100px" EnableLoadOnDemand="true"
        ShowMoreResultsBox="true" EnableVirtualScrolling="true" EmptyMessage="Type here ..."
        OnClientItemsRequesting="ItemsRequesting">
        <WebServiceSettings Path="WcfDataService1.svc" Method="LoadData" />
</telerik:RadComboBox>

[ServiceContract(Namespace = "")]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class WcfDataService1
    {
        [OperationContract]
        public RadComboBoxData LoadData(RadComboBoxContext context)
        {
           // Where is my context :-)
        }
    }





My problem isRadComboBoxContext context in the WebService is always null.
Does anyone know the reason?

1 Answer, 1 is accepted

Sort by
0
Kalina
Telerik team
answered on 16 Jan 2012, 02:03 PM
Hi,

The issue that you describe is quite strange because your code looks alright. I tested it locally - it works as expected and the context object is not null.
Maybe this help article will give you a hint how to resolve the issue.

Regards,
Kalina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
ComboBox
Asked by
Kayhan
Top achievements
Rank 1
Answers by
Kalina
Telerik team
Share this question
or