on 09-04-2007 3:47 PM
Hi, I have a problem with ItemListBox in my current application. At first the items appear unselected, but as soon as I select one of them there's no way to unselect them. I mean, I do it by pressing the control key while clicking on a selected item, but as soon as there is a round trip the item appears selected again.
The node has a selection property of 0:n, a cardinality of 0:n, and the ItemListBox allows multiple selection. Selection change behaviour is set to auto, (but tried with manual too with the same result).
Is there any reason why this should happen? Is it perhaps a bug of this UI element?
Thanks in advance.
Hi
set
intializedLeadSelection = false
and write following in
wdDoModifyView()
wdContext.node<ABC>().setLeadSelection(IWDNode.NO_SELECTION);
it will work for ur requirement.
Thanks
Deepak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Adding buttons or empty elements is my last resort for doing it, but frankly I would like to avoid this because I'd like to make it transparent for the user. What I want to do is just to use the ItemListBox as it is (or should be) intended
By the way did nobody else encountered this same problem with this UI element?
Deepak clearing the lead selection doesn't work. It looks like there is no lead selection, but it keeps as selected (no lead, but as a multiple selection element) the last item that the user unselected.
Thanks all for your interest.
Hi Eduardo,
Try adding an empty element into the Itemlistbox. So each time the user want to clear his selection he can click that first empty row. I havent tried this, but it shud work.
Or you can have a clear button to clear off the selections.
Hope this helps.
--MLS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
create a button with name "clear", bind an action Clear
In OnActionClear(){
wdContext.nodeXx().clearselection();
}
Regards,
Naga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can do as follows:
wdContext.node<name>.setLeadSelection(-1);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I haven't still found a solution to this problem. I'm dealing with multiples selections of a multiple selection node so I can't just change the lead selection with wdContext.node<name>.setLeadSelection(-1); .
I know I can clear all the selections with wdContext.nodeXX().clearSelection(); but the problem is when to do it? The ItemListBox doesn't react to the onLeadSelect events if you allow multiple selections which is the case.
The problem is that the ItemListBox works well unselecting items as long as there is at least one left. But when you unselect the last item it gets selected again in the next round trip, and I have no way to detect the unselection of this last item because onLeadSelect doesn't work.
If anyone has any other idea it will be very welcome. Thanks for your interest.
Hi,
you can remove the selection by using
wdContext.nodeXX().clearSelection();
Regards,
Naga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.