Extjs Context Menu with Tree Panel - extjs

I have a tree panel and I want to show context menu to each tree node when right click to be able to delete it
please help me as soon as you can
Thanks in Advance

I have found the answer in the following link :
http://www.coolite.com/forums/Topic6418-16-1.aspx#bm8010
Thanks

Related

primeng - listbox : item not selected

I copied the code in:
primeng-listbox
But with my primeng version (8.0.2) when I click on an item, it is not selected.
Can you please help ?
Thank you,
Zvika
You need to add [(ngModel)]="selectedCity" inside the p-listbox tag,
you can see example here:
https://stackblitz.com/edit/angular-ivy-xwxi6u?file=src/app/app.component.html

Checkbox tree with Buttons in reactjs

I have a specific requirement to add a Checkbox tree having Action buttons on each node.
As I am new to Reactjs, I tried certain options like react-sortable-tree and react-checkbox-tree, which solves either Action Button or Checkbox requirement.
https://www.npmjs.com/package/react-sortable-tree
Could I get help to find necessary control or control behaviour to fulfil the requirement acceptance?
Thank you,
Sagar
There is rc-tree which is used by Ant Design it has checkable property which makes each tree node a checkbox.
If it does not solve your problem you can create a custom tree view yourself. There are plenty of examples on web (How TO - Tree View).

EXTJS: nodes deselected in multi-select tree panel on right click (itemcontextmenu)

I have a tree panel which has multiselect enabled (selModel:{MODE:MULTI}). If multiple nodes are selected then you right click to activate context menu, all selected nodes except for node that was right clicked on get deselected.
The outcome im looking for is the nodes stay selected, so I can click a menu item and get IDs of all selected Nodes.
There was a bug created for this issue couple years ago and Sencha introduced a new config, ignoreRightMouseSelection, which if set to true, doesnt treat a right click as a selection. But this config is for RowModel. I am using a tree Panel.
The event I'm listening for is treepanels "itemcontextmenu", to show contextmenu
any help appreciated, thanks
I fixed this problem by adding one more parameter to selModel.
selModel: (
{
mode: 'MULTI', ignoreRightMouseSelection:true
})
Try it.

ExtJS TreeGrid - Context Menu anchors incorrectly

I have an ExtJS TreeGrid which I'm attempting to add a ContextMenu onto when a user right clicks. The right click is working fine, but there's one little niggle; the menu doesn't show in the exact position where the user right clicks. Rather, it anchors to the beginning of the node - so if a user right clicks half way across the node they need to travel across the screen to click on a menu item - quite annoying.
This seems a little odd as I have this exact feature working perfectly for the ExtJS Tree. Perhaps it's an ExtJS TreeGrid bug?
Why isn't the contextMenu showing exactly where the user right-clicks in the Tree Grid?
Here's the listener:
listeners: {
contextmenu: function(node,event){
node.select();
myContextMenu.show(node.ui.getAnchor());
}
}
Thanks!
EDIT:
On further inspection, the same thing is happening within the ExtJS Tree - perhaps this can't be avoided?
Apologies for answering my own question, but this sorts it:
listeners: {
contextmenu: function(node,event){
node.select();
myContextMenu.showAt(event.xy);
}
}

Stop combobox from collapsing when [+] in tree within combobox is clicked - extjs 3

I have implemented tree within combobox using idea from this thread
but when [+] or arrow on tree is clicked, the combobox collapses
Is there any way to stop this????????
Please help me....Thanks alot.......
Regards
Same problem here -- my workaround is to show the tree expanded by default.
Yet that doesn't solve the issue with the arrows...
Basically the combobox sees a "blur" event when clicking on the tree and thus collapses.
But I don't know how to prevent that.
By the way, if someone had a fully working "combobox + tree" solution for ExtJS, that would be very helpful.
Because the solution provided on the Sencha forums is quite limited:
Display and value of the combobox has to be the same (whereas I'd like its value to be the tree's node ID)
There's no way to "restore" the value/display of the combobox when it's part of a form (e.g. using "form.loadRecord()")
Thanks for Pepijn who answered my question. Here is the solution:
you can use the tree beforecollapsenode and beforeexpandnode events to find if they are pressed. See the code below:
tree1.on('click',function(node){
combo.setValue(node.text);
nodeAction=0;
combo.collapse();
});
tree1.on('beforeexpandnode',function(node,deep,anim){
nodeAction=1;
});
tree1.on('beforecollapsenode',function(node,deep,anim){
nodeAction=1;
});
combo.on('collapse',function(){
if(nodeAction==1){
this.expand();
nodeAction=0;
}
});

Resources