or
@{ Layout = null;}@model IEnumerable<Nop.Plugin.Other.Rewards.Models.ReferralProgramModel>@(Html.Kendo().Grid((IEnumerable<Nop.Plugin.Other.Rewards.Models.ReferralProgramModel>)Model) .Name("kendoGrid") .Columns(columns => { //columns.Bound(p => p.Id).Width(0).Hidden(); columns.Bound(p => p.Name).Width(100).Title("Name"); //columns.Bound(p => p.ReferralDiscount).Width(20).Title("Friend Discount"); //columns.Bound(p => p.DiscountEventsPerReferral).Width(100).Title("Discounts per Referral"); columns.Bound(p => p.PointsAwardPerReferral).Width(100).Title("Points Reward on referral"); columns.Bound(p => p.MinimumPurchaseForAward).Width(100).Title("Min Purchase Amt"); //columns.Bound(p => p.RewardEventsPerReferredFriend).Width(100).Title("Discount Events"); //columns.Bound(p => p.CookieLifespan).Width(100).Title("Cookie Lifespan"); columns.Bound(p => p.InsertDateUtc).Format("{0:d}").Width(100).Title("Insert Date"); columns.Command(command => command.Edit()); columns.Command(command => command.Destroy()); }) .Editable(editable => editable.Mode(GridEditMode.PopUp)) //.TemplateName("ReferralEditForm") .Pageable(pager => pager.PageSizes(new[] { 5, 10, 20, 50 })) .Sortable() .Selectable() .Filterable() .DataSource(dataSource => dataSource .Ajax() .Model(model => { model.Id(p => p.Id); model.Field(p=>p.Id).Editable(false); }) .Read(read => read.Action("GetReferralPrograms", "Referrals")) .Update(update => update.Action("UpdateRefferalProgram", "Referrals")) .Destroy(destroy => destroy.Action("DeleteReferralProgram", "Referrals")) .Create(create => create.Action("CreateReferralProgram", "Referrals")) )<%: Html.Kendo().Chart<Data.DonneeChart>() .Name("chart") .Title("Multiple Series Chart") .DataSource(dataSource => dataSource .Read(read => read.Action("Charts_Data", "Home")).ServerOperation(false) ) .Series(series => { series.Line(model => model.Weight1) .Color("#ff1a1c") .Name("Weight1") .Axis("weight"); series.Line(model => model.Time1) .Color("#ff0e00") .Name("Time1") .Axis("time"); series.Line(model => model.Weight2) .Color("#73e100") .Name("Weight2") .Axis("weight"); series.Bar(model => model.Time2) .Color("#007aff") .Name("Time2") .Axis("time"); }) .CategoryAxis(axis => axis .Categories(model => model.Period) .AxisCrossingValue(0,9999,9999) .Justify(true) .Crosshair(crosshair => crosshair .Visible(true) .Tooltip(tooltip => tooltip .Visible(true) .Template("Category : #= value #") // Here i would like to show the value of Weight1,Time1,Weight2,Time2 instead of Period value !!! .Format("{0:n1}") )) ) .ValueAxis(axis => axis .Numeric("weight") .Min(0) .Title("(Kg)") .Max(8000) ) .ValueAxis(axis => axis .Numeric("weight") .Color("#ffae00") .Min(0) .Max(35) ) .ValueAxis(axis => axis .Numeric("weight") .Color("#007eff") .Min(0) .Max(1.1) ) .Tooltip(tooltip => tooltip .Visible(false) )%>
@(Html.Kendo().Grid<CDIFFAudit.Models.AntibioticHistory>() .Name("ahGrid") .Events(e=>e.Edit("onEditah")) .Columns(columns => { columns.Bound(p => p.ID).Title("ID"); columns.Bound(p => p.AntibioticID).Title("ID"); columns.Bound(p => p.StartDate).Title("Start").Format("{0:d}"); ; columns.Bound(p => p.Appropriate).Title("Appropriate?"); columns.Command(command => { command.Edit(); }); }) .ToolBar(commands=>commands.Create()).Editable(editable=>editable .Mode(GridEditMode.PopUp)) .DataSource(datasource => datasource .Ajax() .Model(m=>m.Id(p=>p.ID)) .PageSize(10) .Read(read => read.Action("GetAntibioticHistory", "CDIff", new { CDiffID = Model.ID })) .Create(create=>create.Action("insertAntibioticHistory","CDIff")) .Update(update=>update.Action("updateAntibioticHistory","CDiff")) ) .Pageable() .Sortable() .Filterable() )The only answer I can fin about this is this post (http://stackoverflow.com/questions/13384901/grid-into-grid-popup-editor-passing-id-parameter-in-sub-grid ) on StackOverflow , which seems like a complete bodge, and one I don't want, as I'll have at least four grids on this edit form (if it can be made to work).
I need to know whether kendo can support a complex editing scenario such as this, otherwise I'll have to take another route to achieve what's needed.
$(document).ready(
function() {
$(
"#grid").kendoGrid({
dataSource: {
type:
"odata",
transport: {
read:
"http://localhost:61766/WebSite1/WcfDataService.svc/Suppliers"
},
schema: {
model: {
fields: {
SupplierID: { type:
"number" },
ContactName: { type:
"string" }
}
}
},
pageSize: 10,
serverPaging:
true,
serverFiltering:
true,
serverSorting:
true
},
height: 250,
filterable:
true,
sortable:
true,
pageable:
true,
columns: [{
field:
"SupplierID",
filterable:
false
},
"ContactName"
]
});