or
							
// Grid column definitioncolumns.ForeignKey(b => b.OreSourceId, (System.Collections.IEnumerable)ViewData["OreSources"], "Id", "Description")// Foreign key editor template@using System.Collections@using Kendo.Mvc.UI@(Html.Kendo().DropDownList()    .Name("OreSourceId")    .DataTextField("Description")    .DataValueField("Id")    //.Value(Model)    .SelectedIndex(0)    .OptionLabel(">> Select <<")        .BindTo((IEnumerable) ViewData["OreSources"]))// Filling of the ViewDatavar dbDataService = GetService<IDBDataService>();ViewData["OreSources"] = dbDataService.ToLookUp<OreSource>();$('#div').block({message: '<h1 style="color:blue;">אנא המתן...</h1><br><input type="button" value="CANCEL" onclick="cancelSemHours()"/>'});if (!Response.IsClientConnected){    Response.End();}@(Html.Kendo().Grid(Model.EnterpriseModel.EnterpriseReferenceBook)    .Name("EnterpriseReferenceTypeDictionaryGrid")    .Columns(columns =>    {        columns.Bound(item => item.Value);        columns.ForeignKey(i => i.RefReferenceTypeID,            (System.Collections.IEnumerable)ViewBag.RefReferenceTypeFamilyListing, "RefReferenceTypeID", "Type");        columns.Command(command =>        {            command.Destroy();        }).Width(100);    })    .ToolBar(toolbar =>    {        toolbar.Create();        toolbar.Save();    })    .Editable(editable => editable.Mode(GridEditMode.InCell).CreateAt(GridInsertRowPosition.Top))    .Navigatable(navigatable => navigatable.Enabled(true))    .Pageable(pageAction =>    {        pageAction.PageSizes(new int[] { 25, 50 });    })    .Sortable()    .Scrollable()    .Filterable()    .Resizable(resize => resize.Columns(true))    .DataSource(dataSource => dataSource        .Ajax()        .Batch(true)        .ServerOperation(false)        .Events(events =>        {            events.Error("EnterpriseReferenceTypeDictionaryGrid_ErrorHandler");        })        .Model(model =>        {            model.Id(i => i.EnterpriseReferenceTypeID);        })        .Read(read => read.Action("GetEnterpriseReferences", "ReferenceGrid"))        .Create(create => create.Action("CreateEnterpriseReferences", "ReferenceGrid"))        .Update(update => update.Action("UpdateEnterpriseReferences", "ReferenceGrid"))        .Destroy(delete => delete.Action("DeleteEnterpriseReferences", "ReferenceGrid"))    ))