Not able add combobox as edittor for a combobox cell GXT 3.1.2 - gwt

I want to add a combobox in my grid, which would populate its store(of grid) as user provide the word.
If i am adding a custom abstract cell in to grid, I can able to add combobox as edittor to it. But when i am trying to use combobox cell (need to display text in a input tag/ Editable), Combobox is not adding to Grid.
Mean to say when I click on that column, it's not converting to combobox.
Tried with adding keyuphandler to addHandler method. But It's not coming to that handler.

Related

Disable JFace TableViwer single row

Does anyone know how to disable a single row of a JFace TableViwer? I have a TableViwer constructed as follows:
TableViwer tv = new TableViwer(composite, SWT.NONE| SWT.FULL_SELECTION | SWT.BORDER);
tv can have many rows, but I am adding a particular unique row to the table dynamically(when an external button is clicked) and I need to make only that row disabled (grayed out and not selectable. Not selectable can also be achieved through existing handler, if there is no other option).
I searched in google but did not get much information. I am new to SWT/JFace, so any help would be appreciated.
You would have to do something in the selection listener to reject selection of the row.
To make the row gray you can make your Label Provider implement IColorProvider which lets you define the two methods:
public Color getForeground(Object element);
public Color getBackground(Object element);
which can color the row.
You could also use a label provider derived from StyledCellLabelProvider which lets you define more complex coloring.

Whole row editable on click of a row in GWT editable grid

I need to implement a functionality like onclick of a row, whole row must become editable.
For eg: Currently I have 4 columns, each column have edittext cell as the datatype (element). Onclick of a row, each edittext cells must be in edit mode (input mode). Can this implementation be done??
Currently when we click on each component it opens in input mode, but i need to have input mode for all cells on click of a row.
Please suggest and give some ideas.
I think you could do the job with some things in the "databinding" part of GWT :
com.google.gwt.editor.client.Editor

Eclipse jface tableviewer - changing celleditor at runtime

I am using a Table Viewer with cell editors... one is a ComboxBox and the other one is a textcell editor... At runtime based on the selection in the combo box i want to change the other cell editor to either a texteditor or combobox... How can this be achieved??
When you make selection in one comobox editor, you update the underlying model element with the selection in combobox editor. You get the same element in below method getCellEditor(Object element). Depending on state of the element, you should either return TextCellEditor or ComboBoxCellEditor
org.eclipse.jface.viewers.EditingSupport
org.eclipse.jface.viewers.EditingSupport.getCellEditor(Object element)
you find lot of help online about how to use EditingSupport on TableViewer/TreeViewer

EXTJS Combobox : show only NONselected values in dropdownlist for each combo-selection

i have an combobox in a gridcolumn and the requirment is to show only nonselected values in the dropdown list for the next combo selection
One possibility is to use the superselectbox. If you want to customize the standard combobox, you can take a look at the superselectbox source code - it is actually extended combobox.

Creating columns with editable cells in Gtk treeview using Glade

I am trying to create a simple GUI with table containing x and y coordinates of samples. I use treeview, and I want the cells of the table to be editable by user. Is it possible to specify if the cells should be editable directly in Glade in cellrenderer properties, or do I have to specify it in my code? I use Glade 3.6.1
I have just found out that unticking box "Editable" in the Tree View Editor when editing my treeview, enables me to specify whether the cells shall be editable or not, because if the box is unticked, the cells editable property is no longer connected with the model.
But if I run the program, cells are editable, but the value that I write inside disappears. How can I fix that? Why doesn't the cell store the value I type inside?
Thanks for any hint
For anyone dealing with a similar problem, I have solved it - whenever a cell is edited, appropriate record in the model needs to be changed, example code in Python:
cell.connect("edited", self.text_edited, model, column)
def text_edited( self, w, row, new_text, model, column)
model[row][column] = new_text
I found I had to do something just a little different, but I am also using Ubuntu's Quickly development environment. I did have to go into Glade and uncheck the "Editable" box in my cellrenderer, which then brought up a toggable "Yes/No" button. Then my code looks like:
#psuedo-code function definition
cellcolumn_widget.connect("edited", self.function, list_or_treestore, columnnumber)
#actual code, editing second column so column is passed as 1
self.builder.get_object("cellrenderer_chapter").connect("edited", self.cell_edited, self.builder.get_object("liststore_chapters"),1)
def cell_edited(self, widget, row, new_text, model, column):
model.set_value(model.get_iter(row),column,new_text)
for python GTK, by default, text in Gtk.CellRendererText widgets is not editable, you can change this by setting the value of the “editable” property to True:
renderer = Gtk.CellRendererText();
renderer.set_property("editable", True);
then you can connect to the “edited” signal and update your Gtk.TreeModel and/or database accordingly:
renderer.connect("edited", self.entry_edited);
def entry_edited(self, widget, path, text):
self.listStore[path][number_of_row] = text; # put the number_of_row to be edited
check this tutorial for more information python gtk 3 tutorial - CellRendererText