Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JavaScript
  4. Kendo UI for jQuery Combobox noDataTemplate Not Loading

Kendo UI for jQuery Combobox noDataTemplate Not Loading

Scheduled Pinned Locked Moved JavaScript
javascripthtmldatabasecomdesign
1 Posts 1 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hypermommy
    wrote on last edited by
    #1

    Hi all, Hope I'm asking this in the right place. I'm using this example from Telerik but am having no luck at all getting the NoDataTemplate to show. Add new item in jQuery ComboBox Widget Demo | Kendo UI for jQuery[^] My cshtml looks like this (there's a form tag higher up in case that's important):

    <div>
    No data found. Do you want to add new item - '#: instance.text() #' ?
    </div>
    <br />
    <button class="k-button" onclick="addNew('#: instance.element[0].id #', '#: instance.text() #')">Add new item</button>

    And my initialization of the combobox looks like this:

    BCA.Configurator.CodeStringSegment.LoadSegmentGroups = function () {

        var crudServiceBaseUrl = BCA.rootUrl + "eConfigurator";
    
        var dataSource = new kendo.data.DataSource({
            transport: {
                read: {
                    url: crudServiceBaseUrl + "/PrConf/RetrieveSegmentGroups",
                    dataType: "json",
                    type: "POST"
                },
            },
            schema: {
                model: {
                    id: "Key",
                    fields: {
                        Key: { type: "number" },
                        Value: { type: "string" }
                    }
                }
            }
        });
    
        $("#SegmentGroup").kendoComboBox({
            filter: "startswith",
            dataTextField: "Value",
            dataValueField: "Key",
            dataSource: dataSource,
            placeholder: "Select Pricing Group",
            noDataTemplate: $("#noDataTemplate").html(),
            filtering: BCA.Configurator.CodeStringSegment.CheckForNewSegmentGroup,
        });
    }
    

    When I type "cf" (because I know nothing in the list starts with that combination of letters) absolutely nothing happens that I can see. Any idea why? Thanks in advance, all,

    Denise

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups