@(Html.Kendo().Grid<eLuminate.Radar.Web.Provider.Model.Procedures.Price>().Name("prices").Columns(columns => { columns.Bound(c => c.Name).Width(250); columns.Bound(c => c.RelatedProviderName).Title(Model.IsFacility ? "Professional" : "Facility").Width(150); columns.Bound(c => c.High).Format("{0:C0}").Groupable(false).Filterable(false).Width(75).Hidden(); columns.Bound(c => c.Low).Format("{0:C0}").Groupable(false).Filterable(false).Width(75).Hidden(); columns.Bound(c => c.Average).Format("{0:C0}").Groupable(false).Filterable(false).Width(75); columns.Bound(c => c.MyPrice).Format("{0:C0}").Filterable(false).Width(125) .ClientTemplate(Html.Kendo().NumericTextBox().Name("mp_#=ID#").Min(0).HtmlAttributes(new { value = "#=MyPrice#", style = "width: 100px;" }).ToClientTemplate().ToHtmlString()); columns.Command(command => { command.Edit(); command.Destroy(); }).Width(200); }) .ToolBar(toolbar => toolbar.Create()) .Resizable(r => r.Columns(true)) .Filterable() .ColumnMenu() .DataSource(dataSource => dataSource .Ajax() .Batch(false) .Events(events => events.Error("error_handler")) .Model(m => { m.Id(p => p.ID); m.Field(p => p.Name).Editable(false); m.Field(p => p.RelatedProviderName).Editable(false); m.Field(p => p.High).Editable(false); m.Field(p => p.Low).Editable(false); m.Field(p => p.Average).Editable(false); }) .Update(update => update.Action("UpdatePrice", "Procedures", new { id = Model.ID })) .Read(read => read.Action("ReadPrice", "Procedures", new { id = Model.ID })) .Destroy(destroy => destroy.Action("DeletePrice", "Procedures", new { id = Model.ID })) .Create(create => create.Action("AddPrice", "Procedures", new { id = Model.ID })) ) .Editable(editable => editable.Mode(GridEditMode.InLine)) .Selectable() .ClientDetailTemplateId("analytics") .Groupable() .HtmlAttributes(new { style = "width: 800px;" }))@(Html.Kendo().DropDownListFor(c=>c.Site).Name("Site").DataTextField("SiteDescription").DataValueField("Site").DataSource(source=>source .Read(read=>read.Action("GetSiteLookUpList","ManualData"))))@Html.ValidationMessageFor(c => c.Site )@(Html.Kendo().ComboBox() .Name("classes") .HighlightFirst(true) .Filter("contains") .Placeholder("Select Class...") .HtmlAttributes(new { style = "width: 300px;" }) .Suggest(true) .DataTextField("Name") .DataValueField("Id") .DataSource(source => source.Read(read => read.Action("GetClassList", "RCS"))).AutoBind(true)) @(Html.Kendo().ComboBox() .Name("vendorsforClass") .CascadeFrom("classes") .AutoBind(false) .Value("Select Vendor...") .HtmlAttributes(new { style = "width: 300px;" }) .DataTextField("Name") .DataValueField("Id") .Events(e => { e.DataBound("vendorForClassChangeEvent")}) .DataSource(source => { source.Read(read => { read.Action("GetVendorListByClass", "RCS").Data("filterProducts"); }).ServerFiltering(true); })) <script type="text/javascript"> function vendorForClassChangeEvent() { alert('here'); var combobox = $("#vendorsforClass").data("kendoComboBox"); combobox.open(); } function filterProducts() { return { classes: $("#classes").val() }; }<script id="employeesTemplate" type="text/kendo-tmpl">
@(Html.Kendo().TabStrip()
.Name("TabStrip_#=ReqId#")
.SelectedIndex(0)
.Items(items =>
{
items.Add().Text("Exposure Scenarios").Content(@<text>
@(Html.Kendo().Grid<Sypol.Matcon.Infrastructure.Models.ExpScen>()
.Name("Orders_#=ReqId#")
.Columns(columns =>
{
columns.Bound(o => o.ExpId).Width(101);
columns.Bound(o => o.Quantity).Width(140);
columns.Bound(o => o.Freq).Width(200);
columns.Bound(o => o.Number);
columns.Bound(o => o.ContCode);
columns.Bound(o => o.SubCont);
//columns.ForeignKey(o => o.EXPID, (IEnumerable)ViewData["activities"], "EXPID", "METHOD");
})
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("HierarchyBinding_Orders", "InTray", new { reqID = "#=ReqId#" }))
)
.AutoBind(true)
.ToClientTemplate())
</text>
);
items.Add().Text("Details").Content(
"<div class='employee-details'>" +
"<ul>" +
"<li><label>Code:</label>#= ExpId#</li>" +
"</ul>" +
"</div>"
);
})
.ToClientTemplate())
</script>
I basically want to fill the 'Details' tab with data from the selected row on the grid. At the moment I can only manage to add data from the Parent grid. Is it possible to do this or would I have to create another details template to get this information?