jQuery UI Widgets Forums Grid Prevent cellclick event

This topic contains 15 replies, has 3 voices, and was last updated by  Dimitar 9 years, 3 months ago.

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
  • Prevent cellclick event #75401

    ccamusso
    Participant

    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?

    Prevent cellclick event #75402

    Dimitar
    Participant

    Hello ccamusso,

    Here is an example that shows how to differentiate these events: http://jsfiddle.net/Dimitar_jQWidgets/nvnhwoaf/.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    Prevent cellclick event #75824

    ggg
    Participant

    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.

    Prevent cellclick event #75836

    Dimitar
    Participant

    Hi ggg,

    Do you mean you wish the dialog to be opened only if you have clicked an already selected cell?

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    Prevent cellclick event #75947

    ggg
    Participant

    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

    Prevent cellclick event #75948

    ggg
    Participant

    Sorry for the typo @dimitar

    Prevent cellclick event #76096

    Dimitar
    Participant

    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,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    Prevent cellclick event #76190

    ggg
    Participant

    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

    Prevent cellclick event #76199

    Dimitar
    Participant

    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,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    Prevent cellclick event #76230

    ggg
    Participant

    Hi @dimitar, may be I am not explaining clearly. Please look at this jsfiddle.
    This is what i am doing and its evaluating if the cells were selected before the cellclick. What i would like to know is if the event is a click or just selecting bunch of cells.

    Thank You

    Prevent cellclick event #76245

    Dimitar
    Participant

    Hi ggg,

    Please try the following possible solution using jQuery’s mouseup event: https://jsfiddle.net/Dimitar_jQWidgets/381kdxxz/.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    Prevent cellclick event #76280

    ggg
    Participant

    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

    Prevent cellclick event #76282

    ggg
    Participant

    Hi I could make it work> had to include jqxgrid.columnsreorder.js for getting the column index.

    Thank You so much.

    Prevent cellclick event #76286

    ggg
    Participant

    Hi @dimitar, if you get time can you please help me with this too.

    Thank You

    Prevent cellclick event #76287

    ggg
    Participant

    Sorry the correct link is This one

Viewing 15 posts - 1 through 15 (of 16 total)

You must be logged in to reply to this topic.