jQWidgets Forums

jQuery UI Widgets Forums TreeGrid TreeGrid selection

This topic contains 2 replies, has 2 voices, and was last updated by  Franco01 8 years, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • TreeGrid selection #92302

    Franco01
    Participant

    Hi!

    I use jqxtreegrid for show hierarchical data.
    I use selection mode singe.
    When I select one row with
    $("#treegrid").on('rowSelect', function (event) {
    i fill the form value from
    var datarow = $("#treegrid").jqxTreeGrid('getSelection');

    After the user save the form, I reload the treegrid again, and I want to select the selected row.
    Is’it possible?

    I read that I need selection mode custom to use api to set select row, but so I have lost the rowselect event, only I can use rowClick, and then I can’t get datarow element.

    What is the solution If I want to select the prevoiusly selected row, and fill the form with data again?

    TreeGrid selection #92323

    Hristo
    Participant

    Hello Franco01,

    I would like to ask you why you need to reload the TreeGrid after saving the form.
    I suppose you have demo similar as:
    http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxtreegrid/javascript-tree-grid-dialog-editing.htm?light

    If you need to do you could create an array of selected rows (just with 2 items) and to use .push() and .shift() – to keep this number and to know who is the previous row.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    TreeGrid selection #92329

    Franco01
    Participant

    Thanks! It’s great!

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

You must be logged in to reply to this topic.