Replied 24 February 2021, 12:11 am EST
Hi Arun,
To achieve the required functionality, you may handle the keydown event and simulate 'F4' key press on space. Please refer to the following code snippet and the sample demonstrating the same:
grid.hostElement.addEventListener(
"keydown",
function (e) {
// spcae key
if (e.keyCode !== 32 || grid.editRange) {
return;
}
// check if single cell is selected
let sel = grid.selection;
if (!sel.isSingleCell) {
return;
}
// get cell
let cellEl = grid.cells.getCellElement(sel.row, sel.col);
if (!cellEl) {
grid.scrollIntoView(sel.row, sel.col, true);
cellEl = grid.cells.getCellElement(sel.row, sel.col);
}
// check if cell has dropdown
let dropDownToggleButton = cellEl.querySelector(".wj-elem-dropdown");
if (dropDownToggleButton) {
grid.hostElement.dispatchEvent(
new KeyboardEvent("keydown", { keyCode: 115 })
);
e.preventDefault();
}
},
true
);
https://codesandbox.io/s/wijmo-starter-forked-2qsuj?file=/src/index.jsRegards
Sharad