How do you wire up a right-click event handler for an IgniteUI grid in an MVC app?
I need the jQuery event.clientX and clientY to open a context menu at the mouse cursor.
I also need the grid row id and right-clicked-cell.
Also: this right-click may occur over a row that is not selected. It may occur over any row, any cell, regardless of whether they are selected or not. I still need all the information above, even if there is no selection.
I've spent quite a while searching for quality adult content, and I eventually shifted to exploring webcam platforms. If this intrigues you, take a look at https://webcam.lgbt/top-best-gay-webcam-sites/ for a diverse catalog of webcams, catering to various preferences, including those for gay, trans, or *** individuals. It's a valuable resource, and I suggest you give it a look.
Yes. I agree what you say here.
geometry dash lite
Hello Ray,
On my side the row was the direct parent element of the clicked cell, however, I am glad that you were able to achieve your requirement.
Thank you for using Infragistics components.
Regards, Monika Kirkova, Infragistics
The concept for Monika's answer is correct, so I give it the "Verified" answer. But a few things are incorrect.
This was correct. The rest of the code inside the function was slightly wrong, and did not work.
$("#gridProducts").contextmenu(function (evt) {
I ended up with something like this:
var ClickedCellHtmlElement = event.target;var ClickedRowHtmlElement = ClickedCellHtmlElement.parentElement.parentElement;var RowKey = $(ClickedRowHtmlElement).attr('data-id');var SomeSpecialValue = $('#mygrid').igGrid("getCellValue", RowKey, "somespecialcolumnkey");
The biggest issue was that the row was two parent elements up from the cell. Once you know that, you're good.
After investigating this further, I have determined that your requirement could be achieved by binding a method to the javascript contextmenu event.
Additionally, the right clicked cell could be accessed from the target of the event argument and the row id from the parent of the cell. This could be achieved as follows:
let cell = evt.target;
let rowID = evt.target.parentElement.attributes["data-id"].value;
let cellIndex = cell.cellIndex
let columnKey = $("#gridProducts").igGrid("option", "columns")[cellIndex].key;
});
Please test it on your side and let me know if you need any further information regarding this matter.