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
Related
I am using similar kind of jqxgrid shown in below link.
How can we show already selected check boxes ?
Let say I have to show countries in jqxgrid, already i have choosen 2 countries earlier.
Now I want to shown already selected checkboxes as checked and allow user to do more selection of countries.
Please help
Thx
https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/index.htm#demos/jqxgrid/checkboxselection.htm
Have you tried using selectrow method of jqxGrid. You need to pass a row index when you call the method. By doing that, you will select a row and the checkbox will be checked.
Finally I iterate array and Selectrow and it's working
Thanks a lot
How do I get the value of the selected row in rowwidget after the toggle. Please assist, I have tried the the bind functionality but it does not work or necessary for my problem.
if as you said row is selected then this must work: yourGrid.getSelection()[0]
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
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;
}
});
When I selected some item in combobox and then I'm trying to select another item in same combobox, I can see only one item - those which is selected right now. I believe that happens because of autocompletion. Does anybody know how I can disable it or something. I need to see all values on each click, regardless if something was selected already or not.
Add triggerAction:'all' to your config.
better add disableKeyFilter:'true' to your combo box