Hi,
I am trying to implement an example with igGrid (JS) and i can not clear all data in my selection with "DEL" button that on my keyboard.
In Excel we can clear all selected cells and i am wondering what will be happen in igGrid?
Please let me know if you need further assistance regarding this matter.
Tsanna
Thanks for your response.
Hello Burcu,
Apologies for the misunderstanding.
By default you may delete records from grid using Delete key when Updating feature is enabled. However you may delete one selected, not a multiple selected records at once. Therefore to achieve this, you may bind to the keydown event of the grid, retrieve the currently selected cells with selectedCells API method of the grid and use setCellValue API method of grid Updating API in order to set empty cell value to your cells as shown on the screenshot above. Attached is a sample with similar scenario for your reference.
Please let me know if this works for you.
I mean when I press the DELETE button on my keyboard this grid can be 1 to 2 as I added below. I dont understand why these main features of any kind of grid dont supported.
1.
2.
Sorry i think there is a misunderstanding. I dont mention about clearing selection. It was deleting cell datas. Can it possible with igGrid?
I may write delete key event below but i can not find removing cell data example.
$("#grid").igGrid({ width: "100%", autoGenerateColumns: false})
.on('keydown', function (evnt) {
//handle grid's keydown event var ctrl = evnt.ctrlKey, key = evnt.keyCode; if (ctrl && key == 86 || evnt.shiftKey && key == 45) // Ctrl-V || Shift-Ins { //on paste (Ctrl+V) move focus to textarea $("#pasteHelper").focus(); } else if (key == 46) {
// Keyboard DEL button alert("all selected cell datas removed");
} });