This topic is locked

Double-Click Event

7/17/2017 6:23:34 PM
ASPRunner.NET General questions
T
Tina author

Is There a way to get a Double-Click Event instead of only single click? I have a drop down multi row list (I'm assuming this is the only way to get a list box) when user clicks on an item it fires an event to add value to another table, but I don't want the event to fire unless user is sure hence the double click as it's purposeful.
This might also work with multi select list boxes that can go from one box to another and only fire event on save but I don't see this option anywhere. Any Ideas.

admin 7/18/2017

In web apps there is no such such thing as a double-click. Single click is all what you have.
Could you explain though what the following means "when user clicks on an item it fires an event to add value to another table"? If you talking about Add or Edit page nothing is saved till user clicks 'Save'.

T
Tina author 7/18/2017

It's like a simulated multi-select list box where items on the left are added to items on the right. Available Items are a record from another table and can only be assigned once throughout the database. So each item must be assigned to the current table and taken out of the available items bin and auto saved before the actual save to prevent other users from having access to it.
So once user clicks on an item its temporarily marked and assigned,and goes to the selected items list so the user can see the items they've selected. If user actually saves, then the item is permanently assigned, and if user cancels, those items are released back to the available items bin. This is why I wanted a double click event because I can see a user getting frustrated by accidentally clicking on a item and then having to uncheck in another box to remove item.

admin 7/18/2017

Is this "simulated multi-select list box" a part of ASPRunner.NET? I don't think we have anything like this.

T
Tina author 7/18/2017

Yes its part of ASPRunner.NET. The "Simulation" is its a drop down control with multiple rows set to 10 with an on-click event that assigns the item. That works fine. I just wanted it set to double-click instead of single-click. I think Ill just put a button for add instead of the click event, might be simpler.

admin 7/19/2017

I see what you saying. The best option for you is not to choose 'multiline' option. In this case multiselect looks and behaves better and easier to manage for the end user.

T
Tina author 7/19/2017

Thanks, This looks good I agree however I would need it do something on event for when the user selects an item and event on if the user un-selects an item and I'm not sure that can be achieved with this. Unless you do?

admin 7/19/2017

If you use ASPRunner.NET 9.8 you can use Field Events to run some code when control selection changes. You need to know some Javascript and C# in order to do that.