# onDataChange method problem

**URL:** <https://forum.servoy.com/t/ondatachange-method-problem/13322>\
**Category:** Classic Servoy\
**Created:** [December 14, 2010, 5:20pm UTC](https://forum.servoy.com/t/ondatachange-method-problem/13322 "2010-12-14T17:20:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nromeou](https://avatars.discourse-cdn.com/v4/letter/n/779978/32.png) [@nromeou](https://forum.servoy.com/u/nromeou)\
**Post date:** [December 14, 2010, 5:20pm UTC](https://forum.servoy.com/t/ondatachange-method-problem/13322/1 "2010-12-14T17:20:30Z")

</div>

Hi all,  
I´m having problems with onDataChange method. I have a combobox, so when the user select another value from the combo i want to execute this method, but the onDataChange method it´s not running until the lost focus of that combo. My question is How can i solve this problem? how can i manage to run this method when the user select that other value from the combobox?

Thanks for the help, really appreciate

---

<div class="post-metadata">

**Author:** ![Hans\_Nieuwenhuis](https://avatars.discourse-cdn.com/v4/letter/h/87869e/32.png) [@Hans\_Nieuwenhuis](https://forum.servoy.com/u/Hans_Nieuwenhuis)\
**Post date:** [December 15, 2010, 11:46am UTC](https://forum.servoy.com/t/ondatachange-method-problem/13322/2 "2010-12-15T11:46:09Z")

</div>

Save value on focusgained event and check with value using OnAction event ??

Did not test this just a gues.

---

<div class="post-metadata">

**Author:** ![nromeou](https://avatars.discourse-cdn.com/v4/letter/n/779978/32.png) [@nromeou](https://forum.servoy.com/u/nromeou)\
**Post date:** [December 16, 2010, 7:38pm UTC](https://forum.servoy.com/t/ondatachange-method-problem/13322/3 "2010-12-16T19:38:15Z")

</div>

the problem was that i had a ondatachange method and a lostfocus method, so neither of this method where executed until lostfocus. I solve the problem setting to none the lostfocus event.

tks hans
