Using AgGridReact I want to make specific rows selected when grid is binding using ag-grid reactjs

Active3 hr before
Viewed126 times

4 Answers


Is it a correct to use passive voice in the following sentence? , Can I avoid informal personal interactions at companies that offer free lunch? , Using stretch work assignments to help engineers grow

Code snippet :

   rowData: data
}, () => {
   this.gridApi.forEachNodeAfterFilter(function(rowNode) {
      rowNode.setSelected( === 58);

Remember Row Selection works with all frameworks (e.g. Angular and React) as well as plain JavaScript.,suppressRowClickSelection: If true, rows won't be selected when clicked. Use, for example, when you want checkbox selection, and don't want to also select the row when the row is clicked.,Example: Groups & Checkbox Selection

// Loading...
load more v

Would you like to join the AG Grid team in London?Check the jobs board,Documentation Archive,Everyone can use AG Grid Community for free. It's MIT licensed and Open Source. No restrictions. No strings attached.

 Pretag team - issue, fix, solve, resolve

Firstly, row selection must be enabled by setting gridOptions.rowSelection to either "single" or "mulitple", depending on the selection behavior you'd like to implement.,If you would like to learn more about how to handle selection when using row grouping, pivoting, master/detail please take a look at our documentation on Row Selection.,I hope you find this article useful when getting selected data in ag-Grid. Please check out our other blog posts and documentation for a great variety of scenarios you can implement with ag-Grid.

Here is the code when using a JavaScript framework:

getSelectedRowData() {
   let selectedNodes = this.gridApi.getSelectedNodes();
   let selectedData = =>;
   alert(`Selected Nodes:\n${JSON.stringify(selectedData)}`);
   return selectedData;

Other "reactjs-using" queries related to "Using AgGridReact I want to make specific rows selected when grid is binding using ag-grid reactjs"