Retrieve row data on checkbox selection in Ag-grid - ag-grid

I want to retrieve the row data on checkbox selection. Currently in ag-grid, on selecting a row we can retrieve the row data. Or we can do a multi row select, so rows details can be retrieved. So is there any way to retrieve the row data on checkbox selection. Or multiple rows data on checkboxes selection.

you need to use Row Selection
https://www.ag-grid.com/javascript-grid-selection/?framework=javascript#gsc.tab=0
You may use this onSelectionChanged: onSelectionChanged property or
onRowSelected: rowSelectedFunc

Related

When enabling row selection and in AgGrid is there a way to disable selection when rows are grouped?

When I have the rows grouped and have multiple select enabled it lets me click to select the groups as the grid things this is a valid row, is there any way to easily stop row selection when grouped ?
When grouped I don’t want the grid to allow selecting of the geoup

ag-grid select all doesn't select the all the rows in the grid with paging

With ag-grid 23v. I'm trying to add a header checkbox to the checkbox column (just checkboxes). I set the coldef to checkboxselection= true and header checkbox selection to true. But on select all only the rows in the current page gets selected . Is there a event fired on selectall which i could use to set all the rows in all the pages as selected.
I'm using
ag-grid : 23v on angualr: 1.5
Even in pagination mode, the header checkbox selects all rows by default.
You can check this plunkr
It prints the no. of rows selected in console on row selection.
onSelectionChanged(params){
console.log("No of rows selected :" + params.api.getSelectedRows().length);
}
You will notice that header checkbox selection will select all rows across all pages

Separate row selection from row checkbox selection?

Does ag-grid support separating row selection from checked checkboxes?
My users need to select a row (click on it, or keyboard nav) to see further details about the row. Then they need to check the checkbox (or not) to select the row for later export to Excel.
So for example, they'll click every row to see the further details, but only check some of the checkboxes for later export. Is this supported?
If not, what would be a good approach to implement? Add my own checkboxes to the first column?
You can set suppressRowClickSelection to true when you want checkbox selection, and don't want to also select when the row is clicked. If true, rows won't be selected when clicked.
You can read more about this here - https://www.ag-grid.com/javascript-grid-selection/
You can use ag-Grids selection capabilities for the checkbox selection and then use the onRowClicked prop to do a different select on row click. I'm doing just this (but with onRowDoubleClicked.
You still want to set suppressRowClickSelection to true.

In tableau, is there a way to hide/unhide a column of data, similar to excel? Not in data source, but in an actual worksheet?

I just have a bunch of dimensions in rows, so its just a table of information and I need to hide a column of data because its confidential, but I need the data there because it affects the layout of the rest of the table.
Right click on the field that you want to hide on the rows or columns shelf, and turn off show header

How do i disable and enable dropdownlist item based on a user selection on another dropdownlist

I have layout row which contains a dropdown, textfield and two buttons to add and remove rows.
My requirement is i have 10 items in dropdownlist if select one item (say Item1) and click on add row button, a new row will be created as same as first row. Now in the second row dropdownlist items i want to disable the selected item of previous dropdownlist item (Item1).
And i if change the dropdown item of first row to Item3 then automatically in the second row dropdown item it(Item1) should be enabled and vice versa.
How can i do this.
Please help me on this.
Thanks
Sathish
There are probably more ways to do it, but I would store the selected items in an array and store that in your client model.
Then bind the enabled property of your dropdown template to a formatter function which returns false or true, depending on whether the template item is in the selected array or not