How to select all rows in a grid (datatable)

How to select all rows in a grid (datatable)? I tried with :

  1. $$(‘datatable’).select()
  2. $$(‘datatable’).select([‘rowId1’, ‘rowId2’])
  3. $$(‘datatable’).selectAll()
    None of the above methods worked.

Please help ASAP!

You can look at this.

http://docs.webix.com/datatable__selection.html

Thank you for the prompt response.

keyboard shortcut “Ctrl+A” should select all the records (rows) in the grid. If the datatable has 10 rows, hitting Ctrl+A should select all the 10 rows. Please help. Thanks in advance.

Here is

http://webix.com/snippet/365adb8d

Thank you.

http://webix.com/snippet/1f4518af - throws an error when select() method used for selecting all the rows.

I think you missed the point.

Did you read the docs?

Here

http://webix.com/snippet/309fee13

I’m not sure is there a better way to do but it will work.

Thank you so much :). Really appreciate for the prompt response.

1 more point it seems like you dont need getRange()

Yeah, it works without getRange(). Thank you!

You can also try the selectRange method to select all rows in datatable:

dtable.selectRange(dtable.getFirstId(),dtable.getLastId()); 

Yes. That looks better

http://webix.com/snippet/5dd4983c

thank you.