or
@(Html.Kendo().Grid<
FlightListViewModel
>()
.Name("Flights")
.Events(builder => builder.DataBound("gridDataBound"))
.DataSource(dataSource => dataSource
.ServerOperation(false)
.Read(read => read.Action("Index", "Flights"))
.PageSize(50)
)
.HtmlAttributes(new { style = "height:220px;" })
.Columns(col =>
{
col.Bound(customer=> customer.Name).Width(280);
col.Template(t => t.ClassName).ClientTemplate("<
img
class
=
'activate-menu'
src
=
'/Content/Images/flipo.jpg'
style
=
'cursor: pointer;'
/>").Title("").Width(40);
}).Sortable()
.Scrollable()
.Pageable(pageable => pageable.ButtonCount(1))
.ColumnMenu()
.Filterable()
)
$.contextMenu({
selector:
'.activate-menu'
,
trigger:
'left'
,
autoHide:
false
,
callback:
function
(key, options) {
if
(key ==
"Book"
) {
$(
'body'
).css(
'cursor'
,
'wait'
);
$.post(
"/CustomerInformation/SetId"
, { code: className},
function
(data) {
window.location.href =
"/Hotels/CInformation/Index"
;
});
}
},
items: {
"Book"
: {
name:
"Book"
, icon1:
"Booking"
}
}
});
{
field:
"ID"
,
title:
"Title"
,
template:
"#=TITLE#"
,
editor:
function
() {
if
(
RELATED
) {
MyEditor
}
else
{
}
}
}