Hello everyone.
I am doing a proof of concept with telerik mvc grid controls and am in the following situation.
1. Using the Kendo Grid i am trying to do the following..
a Popup Edit screen with a Custom template with a dropdown list that calls the controller for additional info.
Here is the code i have so far
columns.ForeignKey(p => p.CASH_ISIN_CHR, (System.Collections.IEnumerable)ViewData["cashisnnames"], "ISIN_CHR", "Name_CHR").Title("CASH ISIN").EditorTemplateName("CashISINEditor"); columns.ForeignKey(p => p.CURRENCY_ISIN_CHR, (System.Collections.IEnumerable)ViewData["currencyisnnames"], "ISIN_CHR", "Name_CHR").Title("CURRENCY ISIN").EditorTemplateName("CurrencyISINEditor"); columns.Bound(c => c.Units_INT).Title("UNITS"); columns.Bound(c => c.Local_Amount_DEC).Title("Local Amt"); columns.Bound(c => c.Trade_DATE).Format("{0:d}").Title("Trade Date"); columns.Bound(c => c.Settlement_DATE).Format("{0:d}").Title("Settle Date"); columns.Bound(c => c.Custodian_Reference_Num_CHR).Title("Cust. Ref #"); columns.Bound(c => c.Entered_DNT).Format("{0:d}").Title("Entered Date"); columns.Bound(c => c.FX_Rate_DEC).Title("FX Rate"); columns.Command(command => { command.Edit(); }).Width(180);}).ClientDetailTemplateId("template").ToolBar(toolbar =>{ toolbar.Excel(); toolbar.Pdf();}).Excel(excel => excel.FileName("Transaction Master Export.xlsx").AllPages(true)).Pdf(pdf => pdf.AllPages()).ColumnMenu().HtmlAttributes(new { style = "height:750px;" }).Editable(editable => editable.Mode(GridEditMode.PopUp).TemplateName("CustomTransactionMasterEditor")).Pageable()I have an editor template called CustomTransactionMasterEditor and the code in it looks like this:
@model BetaSMTRApp.Models.Transaction_Master<h3>Custom Transaction Master</h3>@Html.TextBoxFor(model => model.FUND_INT).ToString() @Html.TextBoxFor(model => model.TYPE_CHR)@(Html.Kendo().DropDownListFor(m => m) .Name("cashisndd") .DataValueField("ISIN_CHR") .DataTextField("Value") .DataSource(ds => ds .Read(read => read.Action("GetCASHISIN", "TransactionMaster", new { FundInt = 223, TypeChr = "Expense" }) ))In the TextBoxFor fields i am getting fund int and type chr... both of which i need to pass in the .Read on the data source line. When i try to use Model it is null.
How can i get the textbox for value into the new section of the .Read?
Thanks,
Corey