How to show or bind dynamic data to kendo grid using jquery in mvc view,aspx?

   
<script>
$(document).ready(function () {
            $("#ListViewGrid").kendoGrid({
                dataSource: {
                    transport: {
                        read: {
                            url: 'WS_Equipment.asmx/ListView',
                            dataType: 'json'
                        }
                    },
                    schema: {
                        model: {
                            fields: {
                                HeaderId: { type: "string" },
                                JobNumber: { type: "string" },
                                WorkOrderNumber: { type: "string" },
                                WeekendingDate: { type: "string" }
                            }
                        }
                    },
                    pageSize: 5,
                    pageable: true,
                },
                sortable: true,
                pageable: {
                    alwaysVisible: true,
                    pageSizes: [5, 10, 20, 100],
                    refresh: true,
                    buttonCount: 10
                },
                columns: [{
                    field: "HeaderId",
                    filterable: false,
                    width: 100
                },
                {
                    field: "JobNumber",
                    title: "Job Number",
                    width: 200

                }, {
                    field: "WorkOrderNumber",
                    title: "Work Order Number",
                    width: 200
                }, {
                    field: "WeekendingDate",
                    title: "WeekendingDate",
                    width: 200
                },
                {
                    command: [{
                        name: "edit",
                        className: "btn-Edit",
                        text: "View", click: btnEdit
                    }], title: "Action", media: "(min-width: 500px)", width: "110px"
                }
                ]

            });
        });
</script>

<div class="container-fluid">
       <div><br /></div>
        <div id="ListViewGrid"></div>
    </div>

Popular posts from this blog

Implement virtualisation in kendo drop down list using jquery ajax in mvc, aspx page

How to Create trigger to Update the NoofOrgs Count under each category in Category Table based on Temp Table in Sql Server

How to Preview the image and download which is in base64string format in mvc view using C#