table with multiselection and clickable row - gwt

I already have a table - CellTable, with single selection model and i used onSelectionChange to find when row was clicked
Next I added to that column which containes check box
and here comes my problem
if i use single selection model, when i tick one row, other row become unticked
i tried to switch to multiselection model, but in this case, i can't click on row, and onSelectionChanges is executed only when i click on my check box, but i can tick more than one box
is any chance how i can have both - multiselection and clickable row?
regards

Yes it is possible.
But I am suprised that it doesn't work because the default behavior of the MultiSelectionModel should be that the row is selected as soon as you click it. However maybe in the presence of a CheckBoxCell column it is different.
Anyways you have to check following JavaDocs:
Constructor of the CheckboxCell
DefaultSelectionEventManager

Related

Cell event in Nattable

I am new to Nebula Nat table, I have successfully created nattable in my application.
i have several columns one among them, one among them has a combo in it. i want to trigger a listener when ever there is change in the value of the cell . for example if i my combo box has value A and B. if change the value to A to B. i want to trigger a event and based on that event i want to change the value in the another cell.
I tired some of the listener nothing is comfortable, is there any listener in Nattable specific to cell. Because what ever the listener we have all specific nat table as a whole.
I analyzed more i found out that i can do capture selection in the cell using CellSelectionEvent. But what i need is to trigger whenever there is a change in the cell. but CellSelectionEvent triggers at the time of selection. Is there event i can use whenever there is a change in the cell.
With NatTable 1.6 the DataUpdateEvent was introduced for this.

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

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 populate the value of a Text Box based on the value in a Combo Box in MS Access 2007?

I have a combo box which is of a lookup type, i.e., I've selected the source to be a column from a table and am storing the selected value in another table. The table which I am looking up has another column and I need the value in this column to be displayed in a text box and each time I change the value in the combo box, I need the corresponding value to be displayed in the text box. How can I do this? What I have done so far is to write a Select query that selects the appropriate column based on the combo box's value. Is there a more decent way of doing this? Please help me!
Make the source of the combo box to your 2 fields e.g. SELECT id, name FROM Customers
Make sure you set the Column Count property of the combo to 2, accordingly.
Then make you unbound text box source equal to =MyCombo.Column(1) (from memory, this Column is zero based).
That's it, zero code required.
It's nicer to use an event of the combo box e.g. onChange, so when a selection is made the event sets the value of the text box.
me!txtTextBox1 = me!cboComboBox1.column(1)
That way it will work everytime.
You could also use a button with onClick etc. but the choice is yours (and as mentioned in the previous post, alter the column number based on its row source with 0 being the first.
After reading the question and answers I tried the following, and it seems to work well (so far):
In order to display more than one column of a combobox selection, I have resorted to the following:
Place a textbox over the combobox,
Size it by sampling other fields, so that it covers the text frame of the combobox.
I have purposely have left a small space to the right of the NEW textbox to indicate that it
Is NOT part of the combobox.
In the Control Source for the textbox enter the expression below:
=[DefaultAcct].[Column](1) & " " & [DefaultAcct].[Column](2)
Then, in the ‘onchange’ event of the combobox, set focus to the textbox.
Private Sub DefaultAcct_Change()
txtConcatenate1.SetFocus
End Sub