How to select rows on right click in Ag-grid - ag-grid

This might be a rather simple question to answer.
I'm using Ag-Grid with React (ag-grid community + enterprise)
I noticed that if I right click on a row and I select an action on the context menu that appears, it will apply the action to the row that was actually selected and not the one I right-clicked on. How can I select a row with a right-click?
I will add details of my code on demand if needed. Thanks in advance.

You can hook in cellContextMenu grid event and select the corresponding row as the first thing before proceeding to the rest of the logic. Something like this:
<AgGridReact onCellContextMenu={event => event.node.setSelected()}>

Related

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.

How to select rows in swt table

I am trying to create a UI using SWT in eclipse. I have a table with multiple rows and two buttons Start and Next.When I click on Start, the first row is supposed to get selected. When I click Next, the next row has to be selected. And when a row is selected I have to read the corresponding row data.
I tried using
tableViewer.getTable().setFocus();
tableViewer.setSelection(new StructuredSelection(tableViewer.getElementAt(0)),true);
But no row is getting selected.
I also tried with table.getSelection(0);
And now each row is selected but with grey colour.As a result the row selection is not invoking table.addListener().
Please help me with this. I am new to this topic.
Thanks in advance.
You might have missed
tableViewer.refresh ();
before doing setSelection

how in extjs 3 checkboxselectionmodel multiple row select with shift key while keeping the default control functionality can be done?

how in extjs 3 checkboxselectionmodel multiple row select with shift key while keeping the default control functionality can be done?
PLease guide me, its really urgent for me , as m doing POC.
I tried alot, even tried the option of using jquery multiselection grid. but not able to call jquery file on checkboxselectionmodel.
checkOnly : true,
is the config option in checkboxselectionmodel which will allow user to click on checkbox column only to check, and on click of row it will not select the checkbox it wil just make the row select.

Adding Row click event or a check box to each of the rows in a SSRS report

I'm new to SSRS. These may be very trivial questions.
I've a SSRS report, which shows employees in row by row format. Is there any way that I can double click on a row and get the corresponding employeeID of the row. And another question is can I have check boxes in each of the rows so that I can do something based on the rows that was checked? Please help.
Thanks in advance.
To your first question regarding dynamically hiding and showing the employeeid, you would want to use the Visibility property on the employeeid column,row or textbox and set visibility to "HIDE" and check "Display can be toggled by this report item" This will allow you to interactive show/hide the data.
Toggled Item Example
Another quick and easy option would be to set the tooltip property of one of the employee textboxes to
=Fields!EmployeeID.Value
This would give you the employeeid without clicking anything, just hovering over the field.
For your second question about checkboxes, the easy answer is no, it's not built-in to do that. But I have seen interactive "game" reports that run stored procedures to update data as you click on textboxes (which you could make to appear as checkboxes) and drill-through to itself to show refreshed data, but it's more of a hack than actual functionality. Here's a link to one of the examples I've seen.
http://blogs.msdn.com/b/robertbruckner/archive/2009/05/20/multi-player-gaming-in-rs-aka-bi-power-hour-2008.aspx

how to select grid columns by query button in telerik radgrid?

hello friends
i am displaying data in telerik radgrid and i want to add a autocomplete text box with query button to select the particular row using one column for binding.
Can any one provide me a hint?
it has been almost a complete day but im getting no help.
How about using the solution from here? There is a textbox in the command item which filters the records by specified column values (the column is chosen from a dropdown beside the textbox).