What happens with *a lot* of records in the back end?

2 posts, 0 answers
  1. Andrea
    Andrea avatar
    11 posts
    Member since:
    Apr 2009

    Posted 06 Jun 2013 Link to this post

    I'm making tests, on selecting a customer from a database, and binding the combobox value to the model.
    All is ok, but I'm wondering about the fact that I can open the combobox dropdown even without typing any text: what happens if I have, say, a million records? I would like to give the chance to the user to open the drop down only if I have, say, three chars typed in...
  2. jerome
    jerome avatar
    2 posts
    Member since:
    May 2013

    Posted 08 Jun 2013 Link to this post

    Hi Andrea,

    You can use minLength and attach a function to the Open event :
    Here is an exemple for three chars :
                                .BindTo(new List<string>()
                                    {"banana", "apple", "orange"}
                                .Events(e => e.Open("onOpen"))
    function onOpen(e) {
        if (e.sender.text().length < 3) {
Back to Top