# Revision history [back]

### Validator on combobox. How can I rollback selected item on a view?

Hi ZK team,

I have a problem:

I have a grid with combobox in each row. Some of them share comboitems. I have cases, when certain comboitem cant be selected in two comboboxes at the same time.

Thats why I need to make a validation after combobox selectedItem being changed. But when I trying to use something like that <combobox readonly="true" model="@load(each.suitableItemsList)" selecteditem="@bind(each.selectedDart)@validator('foo.bar.Validator')&gt; and validation doesnt pass, binded item stays unchanged(thats correct) BUT selectedItem being changed on view(thats wrong). &lt;/p&gt; &lt;p&gt;Is it conceived behaviour? Could you please give me any suggestions on how can I avoid this? Or how can I rollback item selection on my view?&lt;/p&gt; &lt;p&gt;Thanks. &lt;/p&gt; ">

### Validator on combobox. How can I rollback selected item on a view?

Hi ZK team,

I have a problem:

I have a grid with combobox in each row. Some of them share comboitems. I have cases, when certain comboitem cant be selected in two comboboxes at the same time.

Thats why I need to make a validation after combobox selectedItem being changed. But when I trying to use something like that <combobox readonly="true" model="@load(each.suitableItemsList)" selecteditem="@bind(each.selectedDart)@validator('foo.bar.Validator')&gt; selecteditem="@bind(each.selectedDart)@validator('foo.bar.Validator')&gt;&lt;/code&gt; and validation doesnt pass, binded item stays unchanged(thats correct) BUT selectedItem being changed on view(thats wrong). &lt;/p&gt; &lt;p&gt;Is it conceived behaviour? Could you please give me any suggestions on how can I avoid this? Or how can I rollback item selection on my view?&lt;/p&gt; &lt;p&gt;Thanks. &lt;/p&gt; ">

### Validator on combobox. How can I rollback selected item on a view?

Hi ZK team,

I have a problem:

I have a grid with combobox in each row. Some of them share comboitems. I have cases, when certain comboitem cant be selected in two comboboxes at the same time.

Thats why I need to make a validation after combobox selectedItem being changed. But when I trying to use something like that <combobox readonly="true" model="@load(each.suitableItemsList)" selecteditem="@bind(each.selectedDart)@validator('foo.bar.Validator')&gt;&lt;/code&gt; selecteditem="@bind(each.selectedDart)@validator('foo.bar.Validator')&gt;&lt;code&gt; and validation doesnt pass, binded item stays unchanged(thats correct) BUT selectedItem being changed on view(thats wrong). &lt;/p&gt; &lt;p&gt;Is &lt;p&gt;\nIs it conceived behaviour? Could you please give me any suggestions on how can I avoid this? Or how can I rollback item selection on my view?&lt;/p&gt; &lt;p&gt;Thanks. &lt;/p&gt; ">

### Validator on combobox. How can I rollback selected item on a view?

Hi ZK team,

I have a problem:

I have a grid with combobox in each row. Some of them share comboitems. I have cases, when certain comboitem cant be selected in two comboboxes at the same time.

Thats why I need to make a validation after combobox selectedItem being changed. But when I trying to use something like that

<combobox readonly="true" model="@load(each.suitableItemsList)" selecteditem="@bind(each.selectedDart)@validator('foo.bar.Validator')&gt;&lt;code&gt;
selectedItem="@bind(each.selectedDart)@validator('foo.bar.Validator')>


and validation doesnt pass, binded item stays unchanged(thats correct) BUT selectedItem being changed on view(thats wrong). &lt;/p&gt;

&lt;p&gt;\nIs

Is it conceived behaviour? Could you please give me any suggestions on how can I avoid this? Or how can I rollback item selection on my view?&lt;/p&gt; view?

&lt;p&gt;Thanks. &lt;/p&gt; ">

Thanks.

Support Options
• Email Support
• Training
• Consulting
• Outsourcing