Nattable - ButtonPainter on cell is going on edit mode on click , - nattable

i am trying to follow class Rendereing_a_cell_as_a_button
https://github.com/eclipse/nebula.widgets.nattable/blob/master/org.eclipse.nebula.widgets.nattable.examples/src/org/eclipse/nebula/widgets/nattable/examples/examples/_102_Configuration/Rendering_cells_as_a_link_and_button.java
from Nattable example to create similar button , i have copied same example code.
Button is showing on the desired column, but on click the style is not getting change of button like clicked and also listener is not getting called, it is going to edit mode and showing the content of cell.
Before Click
After click

If your table also supports editing you need to ensure that cells in the column that shows buttons should be not editable. This can be done by registering an IEditableRule#NEVER_EDITABLE for that column.

Related

start cell editor immediately on all cells

I am searching for a solution to how I can start an ag-grid table with only cell editors. That means I do not want to click into the row or cell to edit the data.
I have found almost a solution for me with this example in the doc:
Full row editing
This is exactly what I am searching for. I can programmatically start editing immediately. The problem with that example is that onCellValueChanged is only fired after the keyboard click "enter" or click on the next row.
I would need a solution where onCellValueChanged is fired immediately after a cell changed.
I can think of two ideas to accomplish this:
Use "No Click Editing"
This is similar to having all cells contain an input box. It just takes 1 click to focus.
https://www.ag-grid.com/javascript-grid-cell-editing/#no-click-editing
Custom cell renderer
Use a custom cell renderer to have input boxes in each cell. Then, you are always in edit mode. And you can control when the value is saved.
https://www.ag-grid.com/javascript-grid-cell-rendering-components/

ag-grid popup cellEditor - how to prevent close on click?

I have an ag-grid popup cellEditor which contains an angular mat-select control. Is there a way to prevent the popup cell editor default behavior of closing on a click outside the cell? When an item is selected the ag-grid popup cellEditor closes. I believe this is due to the click on the select drop down being interpreted as outside the cell. Is it possible to prevent popup cell closure for this case or even in all cases such that I can control it completely via code using gridApi.stopEditing()?
See https://material.angular.io/components/select/overview for information on the select control. I am not including full details here as it is likely not important.
Image of popup editor, You can see how cell is before editor is invoked as well. See where the blue number one appears

How to refresh a TableViewer in Eclipse RCP Application

I’m using JFace viewer Framework in my eclipse rcp application, I’ve created a Table Viewer, which populates some data .My view has a refresh button below tableviewer, when I select a row in tableviewer and trigger refresh button the selected row still appears in gray color.
Scenario is depicted below
Before selecting a row
After selecting a row
After refresh
In what way can i remove the gray background as in the above figure and make it as 1st image.
My refresh button listener code is simple which has
viewer.refresh();
as a workaround i tried implementing methods like
viewer.getTable().redraw();
viewer.getTable().setRedraw(true);
which doesn't work, is there a solution to refresh it or should I refresh the view totally
Note: My Execution environment is windows xp
That gray line is current, not previous selection. It's gray because table is not in focus. Use setSelection(StructuredSelection.EMPTY).
If you create the table with the style flag SWT.HIDE_SELECTION the table will not show its selection when it loses focus. I.e. it will look like your first image.

How to add a Button to a HeaderSpan in SmartGWT?

I want to add a Button to a HeaderSpan in SmartGWT. At start, the title of the button will be + (Plus), when the user clicks the button, all the rows of the table are shown and the title of the Button becomes - (Minus). There are around 25 columns in the ListGrid hence I want this behaviour.
I have tried using the HeaderSpan.setAttribute("button", new Button("+")) method but it did not work. Please help.
Any other approach to hide/unhide columns will be very much appreciated.
I've watched this link. As per the overview given in the screen, it does provide hide/show of particular column as well as particular headerspan. On right side of each column a dropdown like button is given which is visible on mouse over & serves your purpose. If you want to change it's icon, you can try the following code, where headerMenuButtonIcon is the path of your image:
grid.setHeaderMenuButtonIcon(headerMenuButtonIcon);
Hope this helps you.

uitableview edit mode

I want when click on edit mode , the action when select a cell be differ , I mean
in normal case when select a cell it be checked (accessory of checking appear)
in edit case an accessory of type button appear when click I navigate to another screen
any suggestion to do that
I have only selectedrowatindex , and commitedit
how to implement that please
like in the image if I clicked edit , the button appear and if I clicked the row (pacs for example I can edit it ) or select the normal delete button
I mean how selectedrowatindex I know either I am in edit mode or not , and how to add accessory to the cell that in edit mode
Look at my solution in
Customizing self.editButtonItem with Check and UnCheck- HELP