Minimum Characters in Filter

Minimum Characters in Filter

abchiabchi Posts: 2Questions: 0Answers: 0
edited October 2009 in General
This is an awesome tool and I love it so far.

I am using datatables to retrieve data from server with Search(filter) enabled. What I want to do is invoke the server call after the user has typed the mininum characters in the search box.

Thanks.

Replies

  • allanallan Posts: 63,687Questions: 1Answers: 10,500 Site admin
    Hi abchi,

    This would be possible with a modification to the fnSetFilteringDelay() plug-in API function ( http://datatables.net/plug-ins/api#fnSetFilteringDelay ). Basically an extra condition on the string length before setting the filter should do the trick (although remember to consider a blank string input to clear the filter ;-) ).

    Regards,
    Allan
  • abchiabchi Posts: 2Questions: 0Answers: 0
    Beautiful.. Thanks so much, Allan.
  • unsiv48unsiv48 Posts: 4Questions: 1Answers: 0

    i need to set minimum 3 characters for search filter text box.. how to do that..?

    Please help me to solve this issue guys..

    with regards,
    Unsiv

This discussion has been closed.