tab key event in ListGrid cell - smartgwt

thing is that i want to catch the tab key event when editing a cell. not every cell is editable, that is for certain record in grid, some cells are editable while others not. when editing with single/double click, i can control the cell edit-ability in recordClickhander(), but when click tab key, it will be out of control coz i don't see any event handler to catch for tab key. so does anyone know how to disable tab key or catch tab key pressed key event when editing in cell? thanks .
Grid do have keyDownHandler/keyPresshandler, but it's only for grid level, not for cell when editing.

Related

Appcelerator ListView transparent row selection?

I've made an app (for iOS) that shows a ListView with product information on it.
On the left of the row, I have a button to add the product to the orderlist. However when I click the button, the entire row changes color. I don't want this, I want the row to stay the same when it is clicked.
I've tried to set the allowSelection property to 'false', but then the 'itemclick' event doesn't fire anymore, so that's not the solution.
I also tried to set the selectedBackgroundColor property to 'transparent', but this still changed the color of the row when the button is clicked.
Is there any easy solution to this? Thanks.
Use "selectionStyle" property of the cell class, example shown below,
cell.selectionStyle = .none
By this usage the selection will occur but it wont change the color on highlighting(selecting state) of the cell.

submit event is not firing when editing a cell in ui-grid

I have a UI with a Save button on the top and with Grid columns setted to cellEditOnFocus : true, when I'm editing a cell and I have to do a scroll to the top to click the Save button it doesn't get called. I have to do another click, I also observe that the Scroll of the page goes back to the position of the row I was editing.
If I don't have to scroll the Save function works on the first click.
How can I avoid this behavior?

How to select just one row, prevent to unselect item in singleselect mode

My question is very simple but I really didn't find any solution here.
I have a Table setSelectable(true), setMultiselect(false), setImmediate(true).
It works fine by first click and moving through the table using arrows.
But if I click again to the row already having been selected,
then it becomes unselected. How to prevent it?
I'd like to have kept just one row always selected.
As from the Vaadin Book here:
If the user clicks on an already selected item, the selection will deselected and the table property will have null value. You can disable this behaviour by setting setNullSelectionAllowed(false) for the table.
So:
table.setNullSelectionAllowed(false);

Delphi DBGrid disable clicking on another row when editing

I have a dbgrid displaying data from a Ttable and my problem is that when
editing a row in the grid the focus is on the row that I want to edit but I can
still click on another row and edit it. How do I disable clicking on another row
or keep focus on the same row?
Second question is (still on the dbgrid) when I edit a column and double click on that column,
the focus moves to the end of the text line therefor not showing the original text but only showing maybe the last character and spaces.
Please help...
After a while of playing around with this, I've discovered that there's no easy way
to disable the user from moving from the highlighted row (row to edit) when clicking another row.
The best way is to cancel when he clicks on another row, I'm using a TTable and TQuery, so
on the BeforePost event, just do a cancel on your table or query. But you also need to do the
same on the AfterScroll even, just in case.
Thanks for all your help.

How to programmatically enter edit mode of an item in a TListView?

In the TListView control, you can edit an item by clicking on it twice. A box appears around the item for user to type in a new value. How can I enable edit mode programmatically? I would like to protect the list from accidental editing, and disable editing (by enabling the ReadOnly property). Then, when the user presses an Edit button, the item will become active to edit. How can I do this?
Also, if suppose the user selects an item, then scrolls out of that item's view, then presses Edit, the list needs to first scroll to make that item visible.
After setting ReadOnly to false you can call the EditCaption method. Call MakeVisible to scroll the item in view.
ListView1.Items[0].MakeVisible(False);
ListView1.items[0].EditCaption;

Resources