var wnd = $("#window").kendoWindow({
title: "Order Details",
modal: true,
visible: false,
resizable: false,
width: 400
}).data("kendoWindow");
function showOrder(e) {
e.preventDefault();
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
var url = '<%= ResolveUrl("~/MyOrder.aspx?orderId=") %>' + dataItem.Id;
wnd.content(url);
wnd.center().open();
}
Hi,
I am trying to implement Grid Ajax but when I click on page 2 the grid is set to 1st page.
following is the view:
@(Html.Kendo().Grid(Model).Name("baseUserInfoGrid")
.Columns(columns => {
columns.Bound(m => m.User_Id);
columns.Bound(m => m.Name);
columns.Bound(m => m.Email);
}).Pageable().Groupable().Sortable()
.DataSource(a => {
a.Server().Read("Index", "Admin");
a.Ajax().Read("_Index", "Admin"); })
)
and Actions:
public ActionResult Index()
{
return View(GetBaseUserInfo());
}
[GridAction]
public ActionResult _Index()
{
return View(GetBaseUserInfo());
}
am I missing something?
Regards,
Yeou
categoryAxis.type: "Date".max NumberThe last date displayed on the axis. By default, the minimum date is the same as the last category. This is often used in combination with the min configuration option to set up a fixed date range.var aDataSource = new kendo.data.DataSource({yaddayaddayadda});var bDataSource = new kendo.data.DataSource({yaddayaddayadda});var cDataSource = new kendo.data.DataSource({yaddayaddayadda});function readDataSources() { bDataSource.read(); cDataSource.read();}; $(document).ready(function () { $("#aGrid").kendoGrid({ dataSource: aDataSource, autobind: true }); $("#bGrid").kendoGrid({ dataSource: bDataSource, autobind: false }); $("#cGrid").kendoGrid({ dataSource: cDataSource, autobind: false });})property.
Column definitions in the grid look like:
columns:[
{field:"Name", title:"Product"},
{field:"IsValid", title: "State"}
]
What I actually want is a column that should behave like:
{field:"IsValid", title: "State"
, template: {
function(model) {
if(model.IsValid && model.Count > 0)
return "<img src ='images/good.png'/>";
else return "<img src ='images/bad.png''/>";
}
}
}
According to the - much better - documentation, "template" property expects a string, but is it possible to add some JavaScript code to the template string as well, something like
var imgTemplate = kendo.template(
"#if (model.IsValid && model.Count > 0){#<img src='icons/A.png'/>#}#else {#<img src='icons/B.png'/>#}#");
and in the columns definitiontemplate: imgTemplate(model)