Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
0
Webdatagrid not triggering link click when activation is enabled
posted

Hi There,

I am using webdatagrid and have the following issue. 

I am setting the value of a cell as a link inside Initialize_Row event. Now, when I use the tab I am able to navigate to this link and pressing Enter triggers the click event.

However when the activation is enabled, pressing tab goes onto the cell, but not onto the link inside that cell and I am unable to trigger the click event by hitting Enter button.

Any suggestions?

Thanks

  • 1080
    Verified Answer
    Offline posted

    Hi,

    Thank you for posting in our community.

    My suggestion is to handle the ActiveCellChanging event:

    <ig:Activation>
    	<ActivationClientEvents ActiveCellChanging="checkNewActiveCell" />
    </ig:Activation>

    You can check if the active cell's column is the one with the link and if the enter key is pressed. Then you can cancel the event and click the anchor tag programmatically:

    function checkNewActiveCell(s, e) {
    	if (e.get_browserEvent().keyCode === 13 && e.getNewActiveCell().get_column().get_key() == "Link") {
    		e.set_cancel(true);
    		e.getNewActiveCell().get_element().children[0].click()
    	}
    }

    I have created and attached a small sample for your reference. Please test this sample on your side and let me know whether it resolves your issue.

    1070.Sample.zip