jQWidgets Forums

jQuery UI Widgets Forums Grid jqxTree editor in jqxGrid is not working consistently

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 9 years, 1 month ago.

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

  • vicalcazar
    Participant

    Implementing a jqxTree “dropdown” within a jqxGrid and having some issues with usage.

    1. Selecting an item in the jqxTree does not consistently return the correct value via: editor.jqxTree(‘getSelectedItem’). At times, you have to click the item in jqxTree twice to get the correct value, other times it returns an incorrect value altogether.
    1b: Additionally, sometimes when a jqxTree item is selected, there’s a ghost duplicated HTML item that hovers at the top of the grid that tracks movements with the mouse.

    2. Able to correctly select the jqxTree item to match the grid cellvalue when displaying the tree via initeditor, but uncertain how do get jqxTree to:
    2a: Expand any parent node(s), if the selected item is a child node
    2b: Scroll the jqxTree to the selected item, if it is not in the visible “dropdown” view.

    Here’s a jsfiddle example showing the usage issues: http://jsfiddle.net/bxbwca5y/

    Any advice is appreciated to get the jqxTree working better inside a jqxGrid.


    Peter Stoev
    Keymaster

    Hi vicalcazar

    The column’s type should be “template”, not “custom”. In addition, if you want to display a Tree, it should be in a DropDown, because it would display a very small tree otherwise. I prepared a new example based on yours: http://jsfiddle.net/jqwidgets/tt8Lm6jg/

    Best Regards,
    Peter Stoev

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


    vicalcazar
    Participant

    Thanks Peter, the dropdown definitely works a lot better.

    There still seems to be an issue with geteditorvalue and it not consistently returning the getSelectedItem of the jqxTree.

    Any additional changes to recommend?


    Peter Stoev
    Keymaster

    Hi vicalcazar,

    It returns the selected item when the editor is closed. Closing of the editor however depends on multiple things so much customization for this kind of custom editor is tricky. For example, editor is closed not only when you click on the Tree item. It is closed when you click somewhere else and in this case it sets the currently selected tree item as a new cell value. It’s not possible to implement: close my editor only if I select a tree item.

    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.