How can I get selected cell content for tableviews with enableCellEditing() ?
Using selectionModel I can get entire row, but not selected cell.
I try to implement copy cell to clipboard hotkey for my tableview. Probably I'm missing the obvious.
After dig deeper in tornadofx I found solution for my own question
shortcut("Ctrl+C") {
if (!selectionModel.isEmpty) {
Clipboard.getSystemClipboard().putString(selectedColumn?.getValue(selectedItem).toString())
}
}
Related
I have a handsontable object using autocomplete (dropdown). When a table cell is empty, and I click on the cell, it shows a dropdown of suggestions.
After I enter a value in that cell, when I click on the arrow, it only shows me one suggestion, that which is already in the cell.
How do I see all of the suggestions, even when there is a value in the cell?
Thanks in advance!
So apparently doing this is the solution:
new Handsontable(element, {
...
filter: false,
...
});
I turn to you stackoverflow!
I'm using a kendo ui batch grid with InCell editing set and am wanting to know a way to set a particular column into edit mode.
I've tried using editCell, and so far it hasn't caused any of the cells to go into edit mode :(
In this particular case, we have a ClientTemplate column specified which has a button (really its a link...) in it. When the user clicks the button I would like a particular cell in that row to switch to edit mode. For reference here's what the specific column template looks like:
columns.Template(t => { }).HeaderTemplate("")
.ClientTemplate(#"
<a href='javascript: void(0)' class='abutton SecondaryActiveBtn' onclick='editVariableRate(this)' title='Edit'>Edit</a>")
.Width(100).Title("");
Here is the particular javascript method that gets called on the button click:
function editVariableRate(element) {
grid = $("#variableFee").data("kendoGrid");
var cell = $(element).closest("tr").find("td:eq(2)");
grid.editCell(cell);
}
Am I doing something wrong here because the particular column never goes into edit mode?
For reference, I can do the following successfully using the same "cell" variable:
var cellIndex = grid.cellIndex(cell);
and cellIndex gets assigned correctly, so I don't think its a problem of selecting the particular cell...
Anybody have any ideas?
Figured it out! It was the link that was the cause of the problem :( Swapping that to be an input button was the only thing that was needed. bangs head into desk.
In Powerbuilder, Does anyone here know how am i going to highlights multiple items on a treeview? Selecteditem function is not doing that. Im looking for a behavior just what Selectedrow id doing.
Thanks!
I've not tried this myself but there is an example on CodeXchange (look for Multi-select TreeView Control).
I think the treeview style datawindow might be easier to do this with.
If not, I found this on the newsgroup, don't know if it helps:
The following script in the
selectionchanged event will implement
a very basic multiselect in the
treeview:
treeviewitem ltvi_item
if KeyDown(KeyControl!) then
This.GetItem(oldhandle, ltvi_Item)
ltvi_Item.Selected = True
This.SetItem(oldhandle, ltvi_Item)
end if
A problem is deselecting the
previously selected items. You would
have to scan through ALL items do look
for the selected ones (once the user
clicks an item without holding down
the control key)
https://groups.google.com/forum/#!msg/powersoft.public.powerbuilder.objects/B2ulHBrSnrs/itwhNBjlyOoJ
One approach to this is to use the CheckBoxes attribute on the treeview, then check the treeviewitem's StatePicture (Unchecked = 1, Checked = 2).
Good luck,
Terry.
While using inline editing , Is there a way to set focus on the first cell inside a row, without using the cell id?
Can the focus be set by the cell index number (position inside the row)?
Thank's In Advance.
If I understand you correct you need just use editCell method of the cell editing. For example
$("#list").jqGrid('editCell',1,3,true);
See the demo.
I search an issue to up/down row with buttons.
I m trying to use 'grid.getCurrentCell' but when i click button currentCell is not yet define.
How can i do this ?
Thanks.
(sorry for my poor english)
You can probably do this using the ID of your row. When you create the row, set the button to
<a onclick='moveUp(23)'><img src='up.gif'></a>
Where 23 is the index in your data. You could also update this by calling:
for(var i in data)
data[i]['upButtonColumn']="<a onclick='moveUp("+i+")'><img src='up.gif'></a>";
grid.removeRows(rows);
grid.render();
Or something similar, but that would be slower.