<li> @Html.LabelFor( m => m.FKStatusTypeId ) @(Html.Kendo() .ComboBoxFor( m => m.FKStatusTypeId ) .BindTo( Model.StatusTypeList) )</li>[Display( Name = "Status" )]public int FKStatusTypeId { get; set; }// use as @Html.DropDownListFor(m => m.FKBillingTypeId, Model.BillingTypeList, "--select--")// @Html.ValidationMessageFor(m => m.FKBillingTypeId)[Display( Name = "Zip Code" )][Required( ErrorMessage = "Zip Code is required" )][ZipCodeOnly( ErrorMessage = "Zip code is not valid" )][ValidateZipCode( ErrorMessage = "ZipCode is not valid" )]public string Zip5 { get; set; }public SelectList ZipCities { get; set; }public IEnumerable<SelectListItem> StatusTypeList{ get { var ctx = new PCDataEFContext(); var sTypes = ctx.StatusTypes; var items = sTypes.Where( st => st.PKId > 0 ) .ToList() .Select( st => new SelectListItem { Text = st.Name, Value = st.PKId.ToString() } ); return items; }}MVC3 I use in Form.cshtml
@Html.DropDownListFor(m => m.GroupID, ViewData["GroupNameDDL"] as SelectList, "-- Select one --") in ControllerViewData["GroupNameDDL"] = _tbl68SpeciesgroupsRepository.Tbl68Speciesgroups.Select(b => new {
Id = b.GroupID, Name = b.GroupName}); TELERIK MVC in EditorTemplate Tbl68SpeciesgroupsForeignKey.cshtml@using System.Collections @using Telerik.Web.Mvc.UI @(Html.Telerik().DropDownList() .Name("GroupNameDDL")in GridViewmodel.cs
.BindTo(new SelectList((IEnumerable)ViewData["GroupNameDDL"], "ID", "Name")))[Required] [UIHint("Tbl68SpeciesgroupsForeignKey")] public int? GroupId { get; set; }How to implementIn Telerik I use in Form.cshtmlcolumns.ForeignKey(b => b.GroupId, (IEnumerable)ViewData["GroupNameDDL"], "ID", "Name");"-- Select one --"
.kendoUpload working fine for Controller Upload call.
like
"public ActionResult UploadImage(HttpPostedFileBase files, string title) { }".columns.Command(command =>
{command.Edit();
command.Custom(
"Details").Text("Line Details").Action("Product", "Home").DataRouteValues(v => v.Add(c => c.SKU).RouteKey("selectSID"));}
);
Corresponding Controller action
public ActionResult Product(string selectSID){
var result = IProductRepository.One(p => p.SID == selectSID);
if (result == null)
{return RedirectToAction("Error");}
else
return PartialView(result);
}
This all works but my Partial View is opened as a full page in the existing window, how can I open this as a popup?
I've tried using JS and kendowindow to open the popup and this does work but I can't see how to pass the SKU from the selected line in the grid so I see my error page loaded in the popup window.
This is my partial view
@model TestKendo.Models.Product
<fieldset>
<div class="display-field">
@Html.DisplayFor(model => model.Description)
</div>
<img src="..\120571.jpg" />
</fieldset>
<p> @Html.ActionLink("Back to List", "Order") </p>
Any and all help appreciated, i've got this far from browsing the forums and sample apps.