jQWidgets Forums

jQuery UI Widgets Forums Grid endcelledit not being called when toolbar button clicked

This topic contains 4 replies, has 2 voices, and was last updated by  DaveB 12 years, 2 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author

  • DaveB
    Participant

    I am using jqWidgets 2.7 and I understand that there was an enhancement back in 2.5 that made the endcelledit event fire even when something was clicked outside of the grid (like a submit button. My app has a toolbar button built into the grid and in it appears the endcelledit is not automatically being triggered. I am assuming this is a bug, but my question is if I wanted to programatically end cell editing how would I do that for the entire grid (I may not know if we are in the middle of an edit or what row/cell is currently being edited).


    Peter Stoev
    Keymaster

    Hi DaveB,

    The Edit operation stops when something outside the Grid is clicked. The toolbar is part of the Grid and so the edit operation will not stop. To get the information about the edited cell, you may bind to the “cellbeginedit” event and save the data about the edited cell. Then, you can manually call the “endcelledit” method using the data from the “cellbeginedit” event.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    DaveB
    Participant

    Is there another way to do this? I have a number of generic functions surrounding the save operation which is triggered from the statusbar. I would rather not require every form to add this code before the save operation takes place. I would like to have this only in my generic JS and to force that cell editing has ended whenever the save button is clicked on the toolbar. In other words, the script itself would have no way of knowing what the current cell being edited was unless every form stored that info in the cellbeginedit event as you had suggested. I would think there has to be a cleaner, more reusable way of doing this. After all, jqWidgets is doing that internally when you click outside of the grid.


    Peter Stoev
    Keymaster

    Hi DaveB,

    At present, I cannot offer you a different workaround. I will create an item about that and we will enhance the automatic endcelledit call in the next version. The function should be called for areas outside the Grid’s table, not the entire Grid.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    DaveB
    Participant

    ok, thank you. I’ll keep my eye out for the enhancement in future versions.

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

You must be logged in to reply to this topic.