Datasource Bind to Form / Input

2 posts, 0 answers
  1. Christopher
    Christopher avatar
    16 posts
    Member since:
    Apr 2013

    Posted 20 Aug 2015 Link to this post

    Hey guys,

    perhaps a simple question, but i'm a little bit confused about this... How can i bind a remote datasource to a simple form. I know already which ID i want to use, but i don't know how to get the one specific ID and bind the Field to an input. In this case i open my page "http://myurl/form.php?id=618" and would like to fill out the whole form.



    <form id="myForm">
          <input type="text" id="myField" class="k-textbox" data-bind="value:myField" />
    var dataSource = new{
        transport: {
            read: {
                url: "http://myURL",
                dataType: "json",
                type: "GET",
                contentType: "application/json"
        schema: {
            model: {
                id: "ID",
                fields: {
                    ID: "ID",
                    myField: "myField",

  2. Rosen
    Rosen avatar
    3247 posts

    Posted 24 Aug 2015 Link to this post

    Hello Christopher,

    The DataSource is design to work with a collection of objects. Therefore, you will need to pick one of the objects, available in the DataSource and bind the form to it. Similar scenario is demonstrated in this online demo.

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top