Monday, 7 September 2015

Simple Kendo Gride use in MVC


$("#serviceCallManagement-grid").kendoGrid({

dataSource: {

type: "json",

transport: {

read: {

url: "@Html.Raw(Url.Action("ServiceCallListKendoData","ServiceCallDetails"))",

type: "POST",

dataType: "json"





}

},

schema: {

data: "Data",

total: "Total",

errors: "Errors"

},

error: function(e) {

display_kendoui_grid_error(e);

this.cancelChanges();

},

pageSize: @(defaultGridPageSize),

serverPaging: true,

serverFiltering: false,

serverSorting: false,

},

filterable: {

extra:false,

operators: {

string:{ contains: "Contains"}

}

},



pageable: {

refresh: true,

pageSizes: [@(gridPageSizes)]

},



scrollable: false,

selectable: false,



columns:

[

{

field: "AccountNo",

title: "Account No.",

width:200





},

{

field: "accountName",

title: "account Name"





},

{

field: "ServiceTicketNo",

title: "Service Ticket No."





},

{

field: "ServiceCodeName",

title: "Service Code"





},

{

field: "EquipmentName",

title: "Equipment Name"





},

{

field: "EquipmentName",

title: "Equipment Name"





},

{

field: "CallLogUtc",

title: "Ticket Created",

template: "#= kendo.toString(kendo.parseDate(CallLogUtc, 'yyyy-MM-dd'), 'MM/dd/yyyy') #"



},

{

field: "ResolutionUtc",

title: "Scheduled Date"



},

{

field: "ServiceResolutionStatusName",

title: "Status"



}





]



} );


No comments:

Post a Comment