Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
799
Clientside selecting of items
posted

Hi,

I have a webdropdownlist of lets say 5 items

First item is ALWAYS empty (Key = -1, text = "")

the other items, are not (of course)

my dropdown is defined by

  • Displaymode="DropDownList"
  • EnableMultipleSelection="true"
  • EnableClosingDropDownOnSelect="false"

 

 

What I'm trying to achieve, in JS, is

  • If the first item (Key = -1) is selected, then all other items need to be unselected
  • If any other item is selected, the first needs to get unselected.
  • It must remain possible to select multiple items (other then -1)

 

Sorry for the weird question perhaps.

 

Parents
No Data
Reply
  • 5105
    Offline posted

    Hi there Razieltje,

    Take a look at the following forum thread: http://forums.infragistics.com/forums/t/55898.aspx

    It deals with pretty much the same thing, except in this case it is checkboxes and you want to work with the selection. All you have to change in that example is to hook to selection changing and if the newly selected item is the first one to loop through all the rest and unselect them, otherwise to get the first item and unselect it. This is done through set_selected(boolean).

    I hope this would do the job!

Children