Bind json source to grid in asp.net without mvc

5 posts, 0 answers
  1. Sandeep
    Sandeep avatar
    13 posts
    Member since:
    Jan 2016

    Posted 25 Jan 2016 Link to this post

    Hi,

    I am binding JSON data to grid.but facing issue on it

    can u pls provide example for asp.net without mvc to bind data to kendo grid.

      <div id="grid"></div>
                <script>
                    $(document).ready(function () {

                        $.ajax({
                            type: "POST",
                            url: "Default.aspx/Test,
                            contentType: "application/json; charset=utf-8",
                            dataType: "json",
                            success: function (response) {
                                BindGrid(response.d);
                            }
                        });
                    });

                    function BindGrid(sourcedata) {
                        $("#grid").kendoGrid({
                            sortable: true,
                            groupable: true,
                            scrollable: true,
                            height: "300px",
                            pageable: {
                                pageSizes: 9
                            },
                            dataSource: sourcedata
                        });
                    }
                </script>

     

     

  2. Sandeep
    Sandeep avatar
    13 posts
    Member since:
    Jan 2016

    Posted 25 Jan 2016 in reply to Sandeep Link to this post

    [{"column1":"10.28.212.88","ProcessDt":"\/Date(1431687934000)\/"},{"column1":"10.28.212.88","ProcessDt":"\/Date(1431687934000)\/"}

    {"column1":"10.28.212.88","ProcessDt":"\/Date(1431687934000)\/"}]

  3. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2895 posts

    Posted 27 Jan 2016 Link to this post

    Hi Sandeep,

    In order to get the binding to work you should apply the following change in the success event handler of the Ajax request:

    success: function (response) {
        BindGrid(response);
    }


    On a side note you may check this repository as it contains sample which demonstrate how to bind Kendo Grid to various server side technologies:


    Regards,
    Alexander Valchev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  4. Miguel Angel
    Miguel Angel avatar
    1 posts
    Member since:
    Jun 2014

    Posted 10 Mar 2016 in reply to Alexander Valchev Link to this post

    Hi Alexander

    I have the same problem in kendo grid mvc, can you help me?

     

  5. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2895 posts

    Posted 14 Mar 2016 Link to this post

    Hi Miguel Angel,

    The scenario discussed in this topic is not relevant to the Kendo UI for MVC wrappers.
    Please open a new thread for your problem and provide more details/sample code so we can examine it and advise you accordingly.

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