ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: groupXS on February 02, 2018, 02:05:58 pm

Title: Get current selected rows
Post by: groupXS on February 02, 2018, 02:05:58 pm
Hi,

Is there any way to get all selected rows or I have to do it manually?
I can listen to rowSelect event and use ui.addList and ui.deleteList and keep that list manually, but problem arise since user can delete one or more seletected rows and use Undo / Redo. Then it is hard to say what is selected or not.
I can use jQuery to access all .ui-state-highlight divs, but then is there a way to get data corresponding to that div?

Thank you
Title: Re: Get current selected rows
Post by: paramvir on February 02, 2018, 07:26:09 pm
jQuery way is not recommended because of virtual rendering; only the visible rows are rendered in the viewport.

There is straightforward API to get selected rows:

Code: [Select]
grid.SelectRow().getSelection()

https://paramquery.com/pro/api#method-SelectRow