TNT23 Posted August 13, 2013 Share Posted August 13, 2013 For those having problems allowing empty value or the selection of only items in list with incremental search in an editable DBLookupComboBox... (i was one too ) Add to the DBLookupCombobox -> ClientEvents -> ExtEvents -> OnAfterrender function OnAfterrender(sender){ sender.allowBlank=true; sender.editable = true;//This allows you to edit the DBLookupCombobox sender.forceSelection=true;//This line allows only item in list to be selected sender.beforeBlur= function(){ var value = this.getRawValue(); if(value == ''){ this.lastSelection = []; } this.doQueryTask.cancel(); this.assertValue(); } } I face a problem on setting null value to the coresponding field at server because the above trick does not set null value to field. I tryed and an ajax request to achieve the update.. but it keeps the last keyfieldvalue of the field.. if anyone can help 4 Quote Link to comment Share on other sites More sharing options...
TNT23 Posted August 15, 2013 Author Share Posted August 15, 2013 I found the solution for the database problem and its working like a charm.. Add the code of the previous post and then just add a dummy value to your query eg. : SELECT -1 as id,'' as descr from dummy union all select id, descr FROM books ; You can now search the unidblookupcombobox list values and CLEAR the data, also if value not in list lookup will get previous value ... 1 Quote Link to comment Share on other sites More sharing options...
molla2005b Posted September 6, 2015 Share Posted September 6, 2015 thank very much. I was search for this very time ago. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.