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.
-
AuthorTreegrid ordering Posts
-
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?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 StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
how to prevent a command button to select the row?
best
ThDHi THD,
Command buttons do not make a row selection. Clicking on a row/cell makes a selection.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi 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
thdHi 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 StoevjQWidgets Team
http://www.jqwidgets.comDear Peter,
any solution for this?
I need this very desperatly.
Best
THDan edit multiple would be already good?
Hi THD,
I already wrote that you can choose from 2 pre-built selection modes. You cannot customize the selection modes.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi 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 helpbest
ThdHi 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 StoevjQWidgets Team
http://www.jqwidgets.comWhy not?
Hi THD,
Because there is no such feature in this widget.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.