This is a migrated thread and some comments may be shown as answers.
columnMenu fails when fiterable method is defined for the columns
1 Answer 8 Views
This is a migrated thread and some comments may be shown as answers.
Tina
Top achievements
Rank 1
Tina asked on 03 Oct 2013, 04:19 PM
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.

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 07 Oct 2013, 09:46 AM
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!
Asked by
Tina
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or