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

[Solved] 'Undefined' error when using select method on grid

2 Answers 726 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Edward
Top achievements
Rank 1
Edward asked on 08 Sep 2014, 03:55 PM
I can't understand why no matter what I do, when I call the select method on my grid it returns:  TypeError: 'undefined' is not an object (evaluating 'o.options').

I plan on selecting it in a dataBound event method.   I did try doing that originally. but it failed in the same way.  My dataSource format is:
[{"id":"CB069D69-5C72-4D87-B4FF-78E8F2B66359","levelsList":"1\\APIDep2"},{"id":"D5968210-FCDA-40EB-A8AB-4E5B44038D83","levelsList":"10\\TCDep10"}]


var dataSource = new kendo.data.DataSource({
      data: levelsForDisplay,
        pageSize: 5,
    });
    var gridDiv = $("#levelsGrid").kendoGrid({
        height: "100%",
        columns: [{
            field: "levelsList",
            selectable: "row",
            headerAttributes: {
                style: "display: none"
            },
        }],
        dataSource: dataSource
    }).data("kendoGrid");
    var id = "CB069D69-5C72-4D87-B4FF-78E8F2B66359";
    var item = gridDiv.dataSource.get(id);
    var tr = $("tr[data-uid='" + item.uid + "']", gridDiv.tbody);
    gridDiv.select(tr);

2 Answers, 1 is accepted

Sort by
0
Edward
Top achievements
Rank 1
answered on 09 Sep 2014, 12:42 PM
i moved the selectable property to the grid from the grid column, but It just makes me receive a "TypeError: 'undefined' is not a constructor (evaluating 'new v.ui.Selectable(a.table,{filter:">"+(r?q:"tbody>tr"+o),aria:!0,multiple:e,change:function(){a.trigger(et)}})')"
0
Edward
Top achievements
Rank 1
answered on 09 Sep 2014, 01:00 PM
Resolved.  I was missing reference to angular js.
Tags
Grid
Asked by
Edward
Top achievements
Rank 1
Answers by
Edward
Top achievements
Rank 1
Share this question
or