Using Server Filtering on a combo box inside a Window throws Javascript error

2 posts, 1 answers
  1. Carrie
    Carrie avatar
    27 posts
    Member since:
    Aug 2013

    Posted 26 Sep 2013 Link to this post


    I am calling a Window that populates using a Controller Action Partial View.   My window will contain cascading dropdowns.  If I add a serverfiltering with a datafilter to my datasource I get a javascript error saying it can't find said method.   When I remove the filter the box populates but Autocomplete doesn't work properly.    If I change it to clientside filtering it works fine but I need to be able to add a group filter.     Is Server filtering not available inside a Window control ?

    I prepared a sample project to illustrate the problem. 

  2. Answer
    Petur Subev
    Petur Subev avatar
    1882 posts

    Posted 30 Sep 2013 Link to this post

    Hello Carrie,

    There is no problem at all to use server filtering combobox within a Window widget. The problem actually is that the function is still not defined since the script are executed in the order they are in the partial view.

    To fix it and make it work just put the script definition above the widget.


        function filterAssignByGroup() {
            alert("window here");
            return {
                userFilter: $("#AssignTaskAssignedTo").val()
    @model KendoUIPOC.Models.User
               @using (Html.BeginForm())
                   @:Select a user
                   @(Html.Kendo().ComboBoxFor(m => m.AssignTaskAssignedTo)
                              .Placeholder("Choose One")
                              .DataSource(dataSource => dataSource
                                             .Read(read => read.Action("GetUserList", "Home")
    <input type="submit" id="AssignByGroupButton" value="Save" class="k-button" />

    I hope this helps.

    Kind Regards,
    Petur Subev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET AJAX banner
Back to Top