jQuery UI Widgets › Forums › Grid › Prevent cellclick event
Tagged: angular grid, Cell, cellclick, celldoubleclick, click, double-click, event, grid, jquery grid, jqxgrid, mouseup
This topic contains 15 replies, has 3 voices, and was last updated by Dimitar 9 years, 3 months ago.
-
AuthorPrevent cellclick event Posts
-
Is possible prevent cellclick event when exist a celldoubleclick event?
I need configure different action for cellclick and celldoubleclick, bad prevent cellclick whene user create celldoubleclick event.
Is possible?
Hello ccamusso,
Here is an example that shows how to differentiate these events: http://jsfiddle.net/Dimitar_jQWidgets/nvnhwoaf/.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Hi @dimitar, this is a pretty good example. I have a similar issue, if you can help me.
My scenario is, On cellclik event I am opening a dialog with information based on that row, but i would like to skip this click event if the user is selecting the cells or rows.Thank You for your time.
Hi ggg,
Do you mean you wish the dialog to be opened only if you have clicked an already selected cell?
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Hi Dmimitar, No I would like to know if the cell is clicked or selected. When its just clicked i would open a dialog but when bunch of cells or a cell is selected for the purpose of copy i wouldn’t want to open the dialog.
Thank You
Hi ggg,
The only way to achieve this I can think of is to check if the cell is already selected on the cellclick event. If no – open the dialog. If yes – do nothing. You can get an array of all selected cells with the getselectedcells method.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Hi @dimitar thank you for the response. it seems to be a good solution if i want to know the already selected cells. My problem is the cellclick fires when i try to select the cells. I want to wait until the event ends to know weather the user is selecting or clicking.
Is there is mouse-up equivalent on jqwidgets?Thank you
Hi ggg,
All available grid events are listed in the jqxGrid API Documentation, under Events.
Your requirement is a bit confusing to me, because both clicking and selecting a cell is done on mouse click. The only differentiation that can be made is whether a selected or not selected cell has been clicked.
If you wish, explain in detail your requirement and give an example from the user’s perspective to make things clearer.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Hi ggg,
Please try the following possible solution using jQuery’s mouseup event: https://jsfiddle.net/Dimitar_jQWidgets/381kdxxz/.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Hi @dimitar, thank you for the prompt reply. but how would i get the rowindex of the clicked cell. Now iam using cellclick and even.args.rowindex to get the index.
Thank You
Hi I could make it work> had to include jqxgrid.columnsreorder.js for getting the column index.
Thank You so much.
-
AuthorPosts
You must be logged in to reply to this topic.