Skip to content

Jquery GridManager when refresh page button control multiply gm.initDefaultButtons #87

@khalildiouriadservio

Description

@khalildiouriadservio

I added a gridmanager (jquery) to my project angular2 using typescript in my ngAfterViewInit I added this

this.gm = jQuery("#content").gridmanager().data('gridmanager'); this.canvas = this.gm.$el.find("#" + this.gm.options.canvasId); this.gm.initGlobalCustomControls();
to init my grid,
so when I navigate to open again my div where I have the grid the button Add Edittable Region multiply every time I navigate and come back to grid page I found that the button Add Edditable Refion multiplied

`gm.initDefaultButtons = function () {

        if (gm.options.colSelectEnabled) {
            gm.options.customControls.global_col.push(
                {callback: gm.selectColClick, loc: 'top', iconClass: 'fa fa-square-o', title: 'Select Column'});
        }
        if (gm.options.editableRegionEnabled) {
            gm.options.customControls.global_col.push(
                {callback: gm.addEditableAreaClick, loc: 'top', iconClass: 'fa fa-edit', title: 'Add Editable Region'});
        }
    };`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions