jQuery UI Widgets Forums Grid cellclick on grid disable

This topic contains 2 replies, has 2 voices, and was last updated by  jahnvi25 10 years, 2 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • cellclick on grid disable #56308

    jahnvi25
    Participant

    so i have added $(“#table”).on(“cellclick”, function (event){}.. but in certain situation i have to disable click
    is there a way to disable and then again enable this..(like jquery has something called .off(..))

    Thanks

    cellclick on grid disable #56322

    Dimitar
    Participant

    Hello jahnvi25,

    In this case, too, you can unsubscribe from the event with .off(). However, a better solution in my opinion would be to check for your condition in the beginning of the event handler and if it is achieved, proceed with the functionality. If not, the event handler can return false and nothing would happen.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    cellclick on grid disable #56350

    jahnvi25
    Participant

    thanks for this solution..

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.