columnMenu fails when fiterable method is defined for the columns

2 posts, 0 answers
  1. Tina
    Tina avatar
    7 posts
    Member since:
    Apr 2011

    Posted 03 Oct 2013 Link to this post

    I can't get columnMenu to display when I have a method defined for each columns filterable attribute.  I get a Microsoft Error.

    My grid configuration looks like :
    $("#gridCityCodes").css("top", "46px").kendoGrid({
     dataSource: this.gridDataSource,
     sortable: true,
     editable: true,
     selectable: "multiple",
     navigatable: true,
     filterable: true,
     resizable: true,
     columnMenu: true,
    change: this.gridChanged,
     toolbar: [{ name: "save", text: userMsgs.Save }, { name: "cancel", text: userMsgs.Cancel}],
     columns: [{ field: "CityAlpha", width: "100px", title: userMsgs.CityCode, filterable: this.fixGridFilterPopups },
     { field: "CityNumeric", width: "150px", title: userMsgs.IataCityCode, filterable: this.fixGridFilterPopups },
     { field: "Description", width: "300px", title: userMsgs.Description, filterable: this.fixGridFilterPopups },
     { field: "NextFlightEnabled", width: "200px", title: userMsgs.NextFlightEnabled, filterable: this.fixGridFilterPopups}],
     dataBound: function () {
     window.selectedModuleViewModel.reHighlightSelectedRows();
     window.selectedModuleViewModel.pullColumnsForFiltering();
     }
     });
        fixGridFilterPopups: {
            ui: function (element) {
    /* logic commented out to do nothing right now. */
            }
        }
    I get an error in kendo.web.js with an error
    var ObservableObject = Observable.extend({
        init: function(value) {
            var that = this,
                member,
                field,
                parent = function() {
                    return that;
                };
     
            Observable.fn.init.call(this);
     
            for (field in value) {
                member = value[field];
     
                if (field.charAt(0) != "_") {
                    member = that.wrap(member, field, parent);  // <-------- error occurs here
                }
     
                that[field] = member;
            }
     
            that.uid = kendo.guid();
        },

    The error I receive is a Microsoft JScript runtime error:  Object doesn't support property or method 'wrap'.  Any ideas on how to get around this?  FWIW, if I turn off the columnMenu option the filter dialog comes up just fine.
  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1442 posts

    Posted 07 Oct 2013 Link to this post

    Hi Tina,

    I am afraid that the provided error logs and code snippets do not reveal enough information on what is causing this behavior. I tried to reproduce it in this jsBin, but to no avail. Could you please check it and let me know how it differs from your setup? In case there are no significant differences I would ask you to provide a runnable project where this issues is reproduced, so we can observe it locally and advice you further.
     

    Regards,
    Alexander Popov
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top