1.What I have is a Kendo TreeView control similar to the below structure.
- Parent 1
- Child 1 of Parent 1
- Child 2 of Parent 1
- Parent 2
I need to trigger an event on Double click of any of the items listed above in the treeview.
There exists an event for single click, that is .Select(). But I don't seem to find one for double click.
Is there any way to trigger a double click event from the control itself, if not, what is the suggested alternate for the same?
Any help/suggestions appreciated
Thanks in advance
PS: I'm using Kendo Trial Version for my POC and want to check whether I'll be able to implement the desired funtionalities for my project before it commenences.
Related
In an effort to add favoriting to a application menu, I'm working on getting onMouseEnter events to fire only on the element that is currently hovered. The problem is that due to these items being nested, onMouseEnter will fire on both the child element and the onMouseEnter of the parent element will also fire.
Ie:
HTML Nesting
The ideal behavior would be this:
Ideal Behavior
But the actual behavior is this:
Actual Behavior
I have already tried stopPropogation, but the problem is that there is a separate event listener on each of the menu items (both the L1 and the L2 have their own on mouse enter listeners). As such, capturing the event at the L2 level doesn't stop the event from firing at the L1 level.
Does anyone know of a way to only trigger the L2 event? Ideally, we wanted to be able to keep hover state specific to each item (ie don't have to have pass handlers for "setIsChildElementHovered"), but open to any ideas people have.
Did you try to add the event only on the child element ? If you have some snippets code might to answer your question. thanks :)
I know that using the template syntax I could use the standard angular 2 (mouseover) event listener to listen for a mouse over event for a specific column. I was wondering if there is a way to listen for mouseover events for an entire row and be able to get the index for that row.
I am trying to a achieve an mouse over hover action the triggers on one row at a time, without having to use multiple <template> tags on each column.
Any help is much appreciated. If there is a better approach then I am all ears.
It is possible to handle the row mouse events from within the 'consuming' component. You should check following GH issue for a runnable sample of such approach: https://github.com/telerik/kendo-angular2/issues/21#issuecomment-247941402
Is there an event that is fired from jqGrid to notify that a certain group is expanded or collapsed?
I have searched in the internet and I found there is an event for treeGrid but not sure about jqGrid.
I wonder if jqGrid has one so we can know if user is expanding / collapsing certain group by listening to that event.
Thanks!
There are exist callback onClickGroup starting with jqGrid 4.0.0 (see here) and jQuery Event jqGridGroupingClickGroup starting with 4.3.2. The parameters are hid, collapsed. See the answer and this one for the corresponding code examples.
I am using an Ext.grid.plugin.RowExpander which uses Ext.grid.feature.RowBody as the base for toggling. The grid has a double click listener that opens a window. The problem is that double clicking on the RowBody does not fire the double click event on the grid and I cannot even find how to hook the event.
I was dumb and did not read the documentation for Ext.grid.feature.RowBody. It clearly says that the feature exposes three "additional events on the gridview" including rowbodydblclick. There is still some difficulty in knowing which row in the grid or more importantly which record the RowBody that trigger the event was part of.
I am working currently on some online editor and I would like to have there the posibility to select multiple elements (all this same class) while holding ctrl key - just like in most of the programs and then make some actions on them - eg. align.
The second thing what I want to achive is to be able to deselect all when I click somewhere - if on element then all beside this, if outside all elements then all elements.
I was trying to insert them into a table if they are clicked and then perform some action - only on objects from this table, but then I don't know how to make them be select only with ctrl button if there is any.
I have also tried this function on clicking outside objects:
$('html').click(function(){
alert("Deselect");
})
But it does't work either.
So, does anyone know any other way to perform this actions?
And here is an example of what I would like to achive (you have to click Advanced Editing) - I mean the align list in the right top corner of editor. Also there is deselection of object when you press outside one, and ctrl selection.
http://www.vistaprint.com
Thank you for your help and ideas.
I suggest you to use the Event delegation:
You attach a click event handler on some container that works as follows:
If ctrl button is not pressed, clear all selections (Maybe you keep all selected items in some list — just remove them all).
If click happen on some element that can be selected (you can determine what element was clicked via event.target, see an article mentioned above) select that one (add to a list).
About ctrl button:
You need a keydown and keyup event handlers. In one of them you turn some isCtrlPressed variable to true, in another — to false.