Skip to content

Cannot read property 'contextmenu' of undefined #407

Closed
@meteerogl

Description

@meteerogl

`$(document).ready(function () {
handler = function(obj, cell, val) {
console.log('My table id: ' + $(obj).prop('id'));
console.log('Cell changed: ' + $(cell).prop('id'));
console.log('Value: ' + val);
};

        insertrow = function(obj) {
            alert('new row added on table: ' + $(obj).prop('id'));
        }

        deleterow = function(obj) {
            alert('row excluded on table: ' + $(obj).prop('id'));
        }

        data = [
            ['Mazda', 2001, 2000, '2006-01-01 00:00:00'],
            ['Pegeout', 2010, 5000, '2005-01-01 00:00:00'],
            ['Honda Fit', 2009, 3000, '2004-01-01 00:00:00'],
            ['Honda CRV', 2010, 6000, '2003-01-01 00:00:00'],
        ];

        $('#my').jexcel({
            data:data,
            colHeaders: ['Model', 'Date', 'Price', 'Date'],
            colWidths: [ 300, 80, 100, 100 ],
            onchange:handler,
            oninsertrow:insertrow,
            ondeleterow:deleterow,
            columns: [
                { type: 'text' },
                { type: 'numeric' },
                { type: 'numeric' },
                { type: 'calendar', options: { format:'DD/MM/YYYY HH24:MI', time:1 } },
            ]
        });
    })`

Activity

JayatirthaJoshi

JayatirthaJoshi commented on Jul 1, 2019

@JayatirthaJoshi

you need to refer jsuites js and css.

pphod

pphod commented on Jul 2, 2019

@pphod
Contributor

I guess you have no included jsuites. There are several examples in the website. Please make sure you include that in your project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

      Participants

      @pphod@JayatirthaJoshi@meteerogl

      Issue actions

        Cannot read property 'contextmenu' of undefined · Issue #407 · jspreadsheet/ce