2 posts, 0 answers
  1. Sven
    Sven avatar
    4 posts
    Member since:
    Oct 2012

    Posted 11 Oct 2018 Link to this post


    I have following code:

        //Autocomplete Gemarkungssuche
            minLength: 1,
            dataTextField: "bez",
            select: onSelectAlkisplace,
            enable: true,
            dataSource: new{
               transport: {
                   read: "mod_alkis/gem_search.php",
                   parameterMap: function(options, operation) {
                       return {
                           placename: options.filter.filters[0].value
               schema: {
                   data: "data"
               //Filter aufServer nicht Client
               serverFiltering: true

    if I enter a letter everything works fine, but if I go back to the beginning of my input with the backspace key or delete everything in the input field I get the following error in the console:
    TypeError: options.filter.filters[0] is undefined
    How can I prevent this?

    Thanks Sven


  2. Neli
    Neli avatar
    270 posts

    Posted 15 Oct 2018 Link to this post

    Hi Sven,

    You could return the filter only if it has value. For example, if the filter is undefined, you could return empty string.
    var placename = options.filter.filters.length > 0 ? options.filter.filters[0].value : ""
    return {
    placename: placename

    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top