jQWidgets Forums

jQuery UI Widgets Forums Grid prevent editor closing

This topic contains 4 replies, has 2 voices, and was last updated by  Peter Stoev 9 years, 7 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • prevent editor closing #75999

    pavel06081991
    Participant

    Hi. Here is example: http://jsfiddle.net/Ln7ztzvb/
    Click on any First Name cell from any row. As you can see I have a custom editor for this cell. In the reality I’ll have my own popup(not your popup plugin) instead of red square, but the red square is just for example.
    In my popup user can do some actions, but when you click on the red square an editor is closed and event “geteditorvalue” is called. Is it possible to prevent editor closing if you click on popup or inside of popup(red square in my example)? Thanks.

    prevent editor closing #76004

    Peter Stoev
    Keymaster

    Hi pavel06081991,

    Grid will not end the editing only when the column’s validation function returns false.

    Best Regards,
    Peter Stoev

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

    prevent editor closing #76014

    pavel06081991
    Participant

    Thanks for your reply, but I think I wrote my question not correctly, so I’ll try to explain one more time what I mean. Here is another example from official documentation: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxtreegrid/#demos/jqxtreegrid/javascript-tree-grid-property-editor.htm
    Click on “Color” cell to start editing. Now color picker popup is open. You can click on this popup but grid will not end editing, it is very good. But when I use my own color picker it has its own popup which is created inside <body> and when you click on this popup,
    grid ends editing because you clicked outside of cell. Why in the example from documentation when you click on popup, grid does not end editing and when I use my own color picker and click on popup, grid ends editing?

    prevent editor closing #76015

    pavel06081991
    Participant

    Oh, I found the same problem on this forum. Here you can see it: http://www.jqwidgets.com/community/topic/jqxcolorpicker-in-grid/#post-68844
    But I did not find a solution of this problem.

    prevent editor closing #76023

    Peter Stoev
    Keymaster

    Hi pavel06081991,

    May be you will have to work more on your custom color picker. The Grid’s examples demonstrate how to use it with custom editors and it closes the editing by default when something is clicked and the focus is not on the editor. You can handle your editor’s mouse events in a way that they are not handled by the Grid after that. I suggest you to read about Events propagation and bubbling in JavaScript in case you want to use some custom made editors.

    Best Regards,
    Peter Stoev

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

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

You must be logged in to reply to this topic.