Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Alex Riek on Jan 01, 2010 12:11
open dhtmlx forum
dhtmlxCombo: Minimum 3 chars before start

Hi! Is there a way, that dhtmlxCombo doesn't get startet before the user entered at least 3 characters?
I think this could make a better performance, when filtering in big databases?
Answer posted by Alex (support) on Jan 04, 2010 05:08

Hello!

It can be done by modification in the dhtmlxcombo.js, filterSelf method:

locate the following code here

 dhtmlXCombo.prototype.filterSelf = function(mode)
  {
  var text=this.getComboText();
  if (this._xml){

and add a check of the text here:

 dhtmlXCombo.prototype.filterSelf = function(mode)
  {
  var text=this.getComboText();
  if (this._xml&&text.length>2){


 

Answer posted by Alex Riek on Jan 04, 2010 08:21
Hi! Thank you for your answer, that works good. The problem is now, when the user is clearing the field (e.g. by typing backspace) and it's empty, the box is showing all data. Is it possible to avoid that?

Best regards,

Alex
Answer posted by Alex (support) on Jan 05, 2010 02:23

Hello

try to use attached file instead of the original one. Possibly it'll help to resolve the issue

Attachments (1)