jQWidgets Forums

jQuery UI Widgets Forums Grid cellendedit and cellclick

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 11 years, 2 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • cellendedit and cellclick #55356

    jahnvi25
    Participant

    i have table with col1,col2,col3 my col1 is editable. user clicks on that to edit.. but before he finished his edit operation. he clicks on col2 on which i have cellClick. and my code for cellClick works fine.. but in that cellClick i am doing setCellValue with col1 (basically entering value in col1). since this cell is still in edit mode.. it does not take my newly entered value..

    is there a way i can cancel cellEndEdit manually when user clicks on any other cell.. and take away focus from there ? (in my case that cell still shows editing mode)

    Thanks

    cellendedit and cellclick #55357

    Peter Stoev
    Keymaster

    Hi jahnvi25,

    You can use the “endcelledit” method to save or cancel the changes and end the editing process.

    Best Regards,
    Peter Stoev

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

    cellendedit and cellclick #55650

    jahnvi25
    Participant

    Thanks.. i tried this.. but have one more question

    so when i call “endcelledit”.. this calls “cellendedit” event.. is there a way to stop this and just call “endcelledit”

    Thanks

    cellendedit and cellclick #55654

    Peter Stoev
    Keymaster

    Hi jahnvi25,

    “endcelledit” is a method, “cellendedit” is an event. The event occurs as a response of some action such as closing an editor either through UI or API. If you have some logic in the “cellendedit” event handler, which you do not want to run when you call the “endcelledit” method, then my suggestion is to create a boolean flag which you set before your “endcelledit” call and check its value within the “cellendedit” event handler.

    Best Regards,
    Peter Stoev

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

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

You must be logged in to reply to this topic.