View Full Version : Only allow each value from a combobox to be selected once in gridpanel

26 Mar 2011, 9:26 AM
I have a gridpanel that has a combobox in one column. Is there a good way to allow users to only select a value from the combo box once.

Ie if my combo box has values:

If a user selects Red in the first column only Green and Blue should be available for the next selection. Also if the user goes back to column one and changes the selection to Green, Red should once again be available for selection but Green will not.

26 Mar 2011, 1:58 PM
you will need to manipulate the combo's store prior to it being queried.

the best way to manipulate the store depends on you own particular circumstances.

for example, is the store loaded from a server? in this case a listener on the store's own load event may be the best place to remove any records that are already in use. alternatively, you could pass the excludes to the server in your request to have the server only return the possible choices. it all depends on your project which is the best way to go about it....