Author Topic: about selectionModel and SelectRow  (Read 2856 times)

fings

  • Newbie
  • *
  • Posts: 12
    • View Profile
about selectionModel and SelectRow
« on: January 21, 2021, 09:04:32 am »
excuse me,
when i set: 
selectionModel: { type: 'cell', row: true }
it's can selected row by number cell,

but, i want to get my SelectRow from this:
let sel = $pqgrid.SelectRow();
let selectArray = sel.getSelection();

it's hasn't any data, selectArray = []???

how can i get SelectRow?

thank you vary much
« Last Edit: January 21, 2021, 09:10:12 am by fings »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: about selectionModel and SelectRow
« Reply #1 on: January 21, 2021, 09:46:38 am »
When selectionModel.type = 'cell' it turns on Range selections which work similar to a spreadsheet.

And for that there is different API.

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

fings

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: about selectionModel and SelectRow
« Reply #2 on: January 21, 2021, 11:39:02 am »
When selectionModel.type = 'cell' it turns on Range selections which work similar to a spreadsheet.

And for that there is different API.

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

oh,thank you, at the same time, i have tryed,

$pqgrid.Selection().getSelection();

it's return array of all selected cells, i can get rowData in it ,thank you~~

fings

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: about selectionModel and SelectRow
« Reply #3 on: January 21, 2021, 11:51:05 am »
When selectionModel.type = 'cell' it turns on Range selections which work similar to a spreadsheet.

And for that there is different API.

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

i have another idea: getRowsByClass; can i?