jQWidgets Forums

jQuery UI Widgets Forums TreeGrid Treegrid ordering

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

Viewing 13 posts - 16 through 28 (of 28 total)
  • Author
  • Treegrid ordering #67505

    thd
    Participant

    and what is with this?
    can I select multiple rows and prevent selecting the row where I click the command button?
    so I will write a code behind change the fields of the selected rows.
    how to see the getselection method for more than one row?

    Treegrid ordering #67506

    Peter Stoev
    Keymaster

    Hi THD,

    This is the available API for jqxTreeGrid: http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxtreegrid/jquery-treegrid-api.htm
    For “getSelection” method – Returns an array of selected rows.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Treegrid ordering #67513

    thd
    Participant

    Hi Peter,

    how to prevent a command button to select the row?

    best
    ThD

    Treegrid ordering #67516

    Peter Stoev
    Keymaster

    Hi THD,

    Command buttons do not make a row selection. Clicking on a row/cell makes a selection.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Treegrid ordering #67520

    thd
    Participant

    Hi Peter,

    I have this and its loosing the selected rows when I click on the button in another row
    http://jsfiddle.net/z64dcb36/

    it can have no data as it is binded to database.

    best
    thd

    Treegrid ordering #67522

    Peter Stoev
    Keymaster

    Hi THD,

    Yes, it should lose the selection when you have selected multiple rows and you click on some other row and don’t hold shift or ctrl. This is how it works. You cannot prevent the built-in selection or customize it. You have selection modes to choose from.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Treegrid ordering #67528

    thd
    Participant

    Dear Peter,

    any solution for this?

    I need this very desperatly.
    Best
    THD

    Treegrid ordering #67529

    thd
    Participant

    an edit multiple would be already good?

    Treegrid ordering #67545

    Peter Stoev
    Keymaster

    Hi THD,

    I already wrote that you can choose from 2 pre-built selection modes. You cannot customize the selection modes.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Treegrid ordering #67628

    thd
    Participant

    Hi Peter,

    Ok we found the solution.

    I have the command button.
    After clicked I get all the checkboxes selected in the treegrid and update them all into a parent field.

    can you show me how to this?

    Currently its like that
    fields

    [checkbox] id | parent | any values | command buttons

    in command buttons i have one
    which is called move and this one
    has now

    
     $(".moveButtons").on('click', function (event) {
    			var selection = $("#jqxtreegrid").jqxTreeGrid('getSelection');
    		
    			for ( selector in selection){
    			var parent = selection[0].id;
    			console.log(parent);
    			}
    			
    				                var rows = $("#jqxtreegrid").jqxTreeGrid('selectedrowindexes');
                    var selectedRecords = new Array();
                    for (var m = 0; m < rows.length; m++) {
                        var row = $("#jqxtreegrid").jqxTreeGrid('getrowdata', rows[m]);
                        console.log(selectedRecords[selectedRecords.length] = row);
                    }
    

    now it should edit all with checkbox selected and give them the id of parent into the parent field.
    Please help

    best
    Thd

    Treegrid ordering #67630

    Peter Stoev
    Keymaster

    Hi THD,

    I already wrote you that it is not possible to reorder rows in jqxTreeGrid. This can’t just happen. There is no API for it.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Treegrid ordering #67642

    thd
    Participant

    Why not?

    Treegrid ordering #67645

    Peter Stoev
    Keymaster

    Hi THD,

    Because there is no such feature in this widget.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 13 posts - 16 through 28 (of 28 total)

You must be logged in to reply to this topic.