Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 1.3 KB

File metadata and controls

40 lines (27 loc) · 1.3 KB
id dxTreeList.getSelectedRowKeys(mode)

shortDescription

Gets selected row keys.

return: Array

Selected row keys. Keys are stored in the order users select rows.

param(mode): String

"all", "excludeRecursive", or "leavesOnly".


Below is an example of a TreeList with several selected rows:

Selection in the DevExtreme TreeList

The getSelectedRowKeys(mode) method called for this TreeList returns different results depending on the mode argument:

  • "all"
    Returns all selected row keys.

      getSelectedRowKeys("all") // returns [2, 5, 8, 9, 6, 10, 4]
    
  • "excludeRecursive"
    Excludes keys in recursively selected rows.

      getSelectedRowKeys("excludeRecursive") // returns [2, 6, 10, 4]
    
  • "leavesOnly"
    Returns keys of the end nodes ("leaves") only.

      getSelectedRowKeys("leavesOnly") // returns [8, 9, 6, 10, 4]
    

[note] If remote operations are enabled, getSelectedRowKeys retrieves selection from currently loaded rows only.

#####See Also##### #include common-link-callmethods