Disabling onrowdblclick event
-
- New User
- Posts: 13
- Joined: Tue Jun 28, 2011 11:00 am
- First Name: Karthik
- Last Name: Ramachandran
- Company Name: Summit Consulting Inc.
- Contact:
Disabling onrowdblclick event
I have a dropdown in my subfile. I also have an onrowdblclick event. I would like these to be mutually exclusive. Is there a way to disable onrowdblclick when the dropdown is enabled?
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Disabling onrowdblclick event
I'm not sure that I understand. These two options should not conflict, because you don't need to double-click when you're using a drop-down.
Are they conflicting?
If not, an easy solution might be to have code in your onrowdblclick event that checks if the drop-down is enabled, and if it's enabled, just do nothing, exit the onrowdblclick function.
If they are conflicting, then please describe the problem so I can understand better, and maybe find a solution.
Are they conflicting?
If not, an easy solution might be to have code in your onrowdblclick event that checks if the drop-down is enabled, and if it's enabled, just do nothing, exit the onrowdblclick function.
If they are conflicting, then please describe the problem so I can understand better, and maybe find a solution.
-
- New User
- Posts: 13
- Joined: Tue Jun 28, 2011 11:00 am
- First Name: Karthik
- Last Name: Ramachandran
- Company Name: Summit Consulting Inc.
- Contact:
Re: Disabling onrowdblclick event
When user clicks on the dropdown in the subfile, doesnt make a selection and releases the mouse button, it happens fast so system assumes user double clicked on the row causing the onrowdblclick event to fire and control coming into the program. If there is a pause between mouse button down and up the onrowdblclick doesn't fire. I understand what you are saying but not sure of the js that I need to include. Would appreciate it if you can show me what I need to include. Thanks.
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Disabling onrowdblclick event
When you refer to the drop-down as "enabled" or "disabled", do you mean that the "disabled" property is set to true (for disabled) or false (for enabled)? Or do you mean something else?
-
- New User
- Posts: 13
- Joined: Tue Jun 28, 2011 11:00 am
- First Name: Karthik
- Last Name: Ramachandran
- Company Name: Summit Consulting Inc.
- Contact:
Re: Disabling onrowdblclick event
I have bound the disabled property on the dropdown to a field and setting on to disable and off to enable within my program. When disable on the dropdown is on, I would like the onrowdblclick event to be enabled and vice-versa. Other thing I noticed is that when I take a look at the HTML, id for the dropdown on the 1st subfile record is "Dropdown1.1". Id within designer is "Dropdown1".
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Disabling onrowdblclick event
Just code something like this in your onrowdblclick:
So if the dropdown is enabled, you don't run the double-click code.
Code: Select all
var dropdown = getObj("Dropdown1." + row);
if (dropdown.disabled) {
// do your double click logic here.
}
-
- New User
- Posts: 13
- Joined: Tue Jun 28, 2011 11:00 am
- First Name: Karthik
- Last Name: Ramachandran
- Company Name: Summit Consulting Inc.
- Contact:
Re: Disabling onrowdblclick event
Works great. Thank you.
-
- Experienced User
- Posts: 116
- Joined: Wed Sep 05, 2012 11:14 am
- First Name: Eric
- Last Name: Hill
- Company Name: Integrated Corporate Solutions
- Phone: 256-760-8239
- Address 1: 501 S Wood Avenue
- City: Florence
- State / Province: Alabama
- Zip / Postal Code: 35630
- Country: United States
- Contact:
Re: Disabling onrowdblclick event
I'm going to hijack this thread for a similar problem I am having. I have sent a request to support but have not heard back from them. I sent them one of the DDS's in question.
We are having a fairly major dropdown problem in Internet Explorer 9.
We have screens that have a dropdown that is a part of a grid/subfile AND have a default action assigned to the onrowclick property. In IE9 whenever a selection is made on the dropdown in the row it is picking up the onrowclick action and using it. If we use our arrow key on the dropdown to select and the press ENTER or click Submit, it will work ok but that is a lot to ask of a user.
This seems to have happened after we upgraded to 4.5.2. Other versions of Internet Explorer seem to work ok and Chrome works ok as well.
Any idea what is going on with this and do you have a workaround similar to the one shown above?
Thanks!!!!!
We are having a fairly major dropdown problem in Internet Explorer 9.
We have screens that have a dropdown that is a part of a grid/subfile AND have a default action assigned to the onrowclick property. In IE9 whenever a selection is made on the dropdown in the row it is picking up the onrowclick action and using it. If we use our arrow key on the dropdown to select and the press ENTER or click Submit, it will work ok but that is a lot to ask of a user.
This seems to have happened after we upgraded to 4.5.2. Other versions of Internet Explorer seem to work ok and Chrome works ok as well.
Any idea what is going on with this and do you have a workaround similar to the one shown above?
Thanks!!!!!
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Disabling onrowdblclick event
I must admit, I was unable to reproduce the problem that Karthik reported, and I'm also unable to reproduce the problem that you're having, Eric.
Are you also disabling your dropdowns some of the time? If so, the exact same code (except, placed in the onrowclick) should work...?
Are you also disabling your dropdowns some of the time? If so, the exact same code (except, placed in the onrowclick) should work...?
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Disabling onrowdblclick event
Hmm.. actually, I take that back, Eric.. I can reproduce your problem. Scott W. has a copy of your display file, and sure enough, the onrowclick event fires whenever you click the dropdown.
It was happening for me in Firefox and IE10. So it doesn't seem to just be IE9...
It was happening for me in Firefox and IE10. So it doesn't seem to just be IE9...
Who is online
Users browsing this forum: No registered users and 1 guest