or
models[0][Discontinued] | false |
models[0][ProductID] | 3 |
models[0][ProductName] | Aniseed Syrup |
models[0][UnitPrice] | 12 |
models[0][UnitsInStock] | 13 |
models[0][UnitsOnOrder] | 0 |
models[0].Discontinued | false |
models[0].ProductID | 3 |
models[0].ProductName |
Aniseed Syrup |
models[0].UnitPrice | 12 |
models[0].UnitsInStock | 13 |
models[0].UnitsOnOrder | 0 |
<div data-role=
"view"
id=
"someView"
data-show=
"showSomeView"
data-beforeShow=
"viewBeforeShow"
>
/* div content here */
</div>
function
viewBeforeShow(view) {
if
(loggedOut ==
true
) {
// loggedOut is just a global variable for now
window.kendoMobileApplication.navigate(
'#loginView'
);
// loginView is the login mobile view
}
}
@(Html.Kendo().Grid<
LightRouteDB.RouteCustomer
>()
.Name("CustomerGrid")
.Columns(cols =>
{
cols.Bound(r => r.CustomerID);
//cols.Bound(r => r.Customer.CustomerName);
cols.Bound(r => r.Sun);
cols.Bound(r => r.Mon);
cols.Bound(r => r.Tue);
cols.Bound(r => r.Wed);
cols.Bound(r => r.Thu);
cols.Bound(r => r.Fri);
cols.Bound(r => r.Sat);
cols.Command(command => { command.Edit(); command.Destroy(); }).Width(200);
})
.ToolBar(toolbar => toolbar.Create())
.Editable(editable => editable.Mode(GridEditMode.InLine))
.Pageable()
.Sortable()
.Scrollable()
.DataSource(ds => ds
.Ajax()
.Events(events => events.Error("error_handler"))
.Model(m => { m.Id(p => p.RouteCustomerID); m.Field(f => f.RouteID).DefaultValue(Model.Route.RouteID); })
.Create(a => a.Action("CreateCustomerRow", "Routes"))
.Read(r => r.Action("ReadCustomerRows", "Routes"))
.Update(u => u.Action("UpdateCustomerRow", "Routes"))
.Destroy(d => d.Action("DestroyCustomerRow", "Routes"))
)
)
public
ActionResult ReadCustomerRows(
int
id, [DataSourceRequest] DataSourceRequest request)
{
return
Json(getRouteCustomersFromSession().ToDataSourceResult(request));
}
[AcceptVerbs(HttpVerbs.Post)]
public
ActionResult CreateCustomerRow(
int
id, [DataSourceRequest] DataSourceRequest request, RouteCustomer customer)
{
if
(customer !=
null
&& ModelState.IsValid)
{
IList<RouteCustomer> rc = getRouteCustomersFromSession();
rc.Add(customer);
}
return
Json(
new
[] { customer }.ToDataSourceResult(request, ModelState));
}
[AcceptVerbs(HttpVerbs.Post)]
public
ActionResult UpdateCustomerRow([DataSourceRequest] DataSourceRequest request, RouteCustomer customer)
{
if
(customer !=
null
&& ModelState.IsValid)
{
IList<RouteCustomer> rc = getRouteCustomersFromSession();
var target = rc.Where(c => c.RouteCustomerID == customer.CustomerID).First();
if
(target !=
null
)
{
target.CustomerID = customer.CustomerID;
saveRouteCustomersToSession(rc);
}
}
return
Json(ModelState.ToDataSourceResult());
}
app.navigate(
'/Home/SelectMake?year=2012'
);
app.navigate(
'/Home/SelectMake'
);
<div>
<form name="form" >
<input type="text" name="msg" value="Your message"/>
<input id="btnsumbit" type="submit" />
</form>
</div>
<div>
<iframe id="guestFrame1" name="guestFrame1" width="500px" height="150px" frameborder="1" src="http://localhost/kendosample " >
</iframe>
</div>
<script>
var win = document.getElementById("guestFrame1").contentWindow
document.forms.form.onsubmit = function ()
{
win.postMessage(this.elements.msg.value, "*")
return false
}
</script>
Please let me know, how to apply the above same logic in kendo window
$("#grid").kendoGrid
({
dataSource:
{....
columns:
[{
field:"ReadData.php?DataToRead=LastName"
width: 90
}]
}
})
@(Html.Kendo().Grid<
Models.AutomationDevicePartsMapping
>()
.Name("GridAutomationDevicePartsMapping")
.Columns(columns =>
{
columns.Bound(p => p.QuantityMultiplier).Title("Quantity");
columns.Bound(s => s.PartNumberName)
.Width(300)
.ClientTemplate(Html.Kendo().DropDownList()
.Name("PartNumberxyz")
.Events(ev => ev.Change("AutomationDeviceMappingDDLChanged"))
.BindTo(ViewBag.MeterParts)
.DataTextField("Text")
.DataValueField("Value")
.HtmlAttributes(new {style = string.Format("width:{0}px", 200)}).ToClientTemplate()
.ToHtmlString()
);
})
.ToolBar(toolbar => toolbar.Create())
.Editable(editable => editable.Mode(GridEditMode.InLine))
.Pageable()
.Sortable()
.Scrollable()
.Selectable(s => s.Mode(Kendo.Mvc.UI.GridSelectionMode.Single))
.DataSource(dataSource => dataSource
.Ajax()
.Model(model => { model.Id(p => p.AutomationDeviceId);
model.Field(p => p.PartNumberName).Editable(false);
})
.Create(update => update.Action("CreateNewAutomationDevicePartsMap", "AutomationDevice").Data("AutomationDeviceID"))
.Read(read => read.Action("GetAutomationDeviceMaps", "AutomationDevice").Data("AutomationDeviceID"))
.Update(update => update.Action("UpdateAutomationDevicePartsMap", "AutomationDevice"))
.PageSize(50)
)
)