toggleClass is not defined

Posted by: ed on 2 November 2019, 5:35 pm EST

    • Post Options:
    • Link

    Posted 2 November 2019, 5:35 pm EST

    I am working with a .net core 2.2 application and trying to load cell notes when initializing my grid. Here is my code;

    addGrid = function (controlName, icons) {

    var tooltip = new wijmo.Tooltip(), rng = null; 
    var invoiceGrid = new wijmo.grid.FlexGrid(controlName,
            {
                columns: [
                   my code defining columns 
                ],
                formatItem: function (s, e) { 
                    if (e.panel == s.cells) {
                        var item = s.rows[e.row].dataItem, binding = 					s.columns[e.col].binding, note = item.notes ? item.notes[binding] : null;
                        toggleClass(e.cell, 'wj-has-notes', note != null);
                        if (note != null) {
                            tooltip.setTooltip(e.cell, '<b>Comments:</b><br/>' + note);
                        }
                    }
                }
               
            });
    return invoiceGrid
    

    };

    When I run application I get the error toggleClass is not defined. I am including the following scripts;

        <script src="~/js/wijmo.chart.min.js"></script>
        <script src="~/js/wijmo.grid.min.js"></script>
        <script src="~/js/wijmo.nav.min.js"></script>
        <script src="~/js/wijmo.input.min.js"></script>
    

    Also, do you have an example of how to add/edit a cell note while the application is running and after the grid has been loaded?

    Thanks, Ed

  • Posted 2 November 2019, 7:02 pm EST

    Ignore this I figure out my problem.

  • Posted 3 November 2019, 11:11 pm EST

    Hi Ed,

    We are glad that you were able to resolve the issue. If you still need a sample for adding and editing cell notes, let us know.

    Regards,

    Ashwin

  • Posted 4 November 2019, 12:21 pm EST

    Hi Ashwin,

    Yes, I would still like a sample for adding and editing cell notes.

    Thanks, Ed

  • Posted 5 November 2019, 1:11 am EST

    Hi Ed,

    Please refer to the sample link below:

    https://stackblitz.com/edit/js-c6uxvo

    ~regards

  • Posted 5 November 2019, 5:43 pm EST

    Thanks Ashwin!

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels