hi,
i have a virtual scrollable grid for which i set the height:
.Resizable(resize => resize.Columns(true))
.Scrollable(scrollable => scrollable.Virtual(true))
Scrollable(s => s.Height("500px"))
i also need to display custom record count using footerTemplate
columns.Bound(o => o.TradeNumber).Width(130).Groupable(false).Locked(true).FooterTemplate("Total records: " + recordCount);
setting the height above hides the footer. but i need to set the height since its virtual and i need it scrollable.
what can i do?
thanks.
Hi,
I have a Grid with incell edits rows.
I search since the last 2 day to found a solution to have
some line with attribute Readonly or disabled if the cell date is <= than a @ViewData[“DisabledDate“]. I don't want user to modify this lines.
I found this way : http://dojo.telerik.com/UQaGo .... but it a inline edit mode. I have to find a solution with InCell mode. I don't want to have to click "update" and "save" on each row.
Thank and sorry for my English.
My grid code :
@(Html.Kendo().Grid<Mentorat.Models.Intervention>() .Name("grid") .Columns(columns =>{ columns.Bound(c => c.Date_Intervention).Title("Date").Format("{0:yyyy/MM/dd HH:mm:ss}").Width(130).ClientGroupFooterTemplate("#= count # intervention(s)").ClientFooterTemplate("#= count # intervention(s)"); //columns.Bound(c => c.Date_Intervention).Width(130).Title("Date").ClientGroupFooterTemplate("#= count # intervention(s)").ClientFooterTemplate("#= count # intervention(s)").HtmlAttributes(new { @class = "templateCell" }).ClientTemplate(( // @Html.Kendo().DateTimePicker().Name("date_#=No_Intervention#").Format("{0:yyyy/MM/dd HH:mm}").HtmlAttributes(new { data_bind = "value:Date_Intervention" }).ToClientTemplate()).ToHtmlString() //); columns.Bound(c => c.Duree_Intervention).Title("Durée (min.)").Width(70).ClientGroupFooterTemplate("Total : #= kendo.format('{0:0.00}', sum/60)# hrs").ClientFooterTemplate("Total : #= kendo.format('{0:0.00}', sum/60)# hrs"); columns.ForeignKey(c => c.No_Mentore_Intervention, (System.Collections.IEnumerable) ViewData["ListeMentor"], "No_Mentore", "NomComplet_Mentore").Title("Mentoré").Width(160).ClientGroupHeaderTemplate("#= getHeaderMentores(value,data)#"); columns.Bound(c => c.Description_Intervention).Title("Description").Width(300); columns.Command(command => { command.Destroy(); }).Width(65); }) .ToolBar(toolbar => { toolbar.Create(); toolbar.Custom().Name("RepartirTemps").Text("Répartir").HtmlAttributes(new { id = "RepartirTemps", @class = "k-plus" }).Url("#"); toolbar.Save(); toolbar.Excel(); }) .Editable(editable => editable.Mode(GridEditMode.InCell)) .Pageable() .Filterable(ftb => ftb.Mode(GridFilterMode.Menu)) .Groupable() .Events(events => events.DataBound("onDataBound")) .Events(events => events.Edit("onEdit")) .DataSource(dataSource => dataSource .Ajax() .Events(e => e.Change("onChange")) .Batch(true) .PageSize(20) .Model(model => model.Id(p => p.No_Intervention)) .Read(read => read.Action("Interventions_Read", "Interventions")) .Create(create => create.Action("Interventions_Create", "Interventions")) .Update(update => update.Action("Interventions_Update", "Interventions")) .Destroy(destroy => destroy.Action("Interventions_Destroy", "Interventions")) .Aggregates(ag => { ag.Add(p => p.Duree_Intervention).Sum(); ag.Add(p => p.Date_Intervention).Count(); }) ) )

I'm trying to figure out how to populate a dropdown list when editing a ListView item. I'm binding to a ViewModel that contains an IEnumerable<SelectListItem>. On other pages without a ListView, I do something like below, however I'm not sure what action I can use to set up the model so that I have access to it when editing using the ListView. I tried looping through each item in the Read action and setting States there, which is definitely inefficient, but regardless didn't work. Any ideas?
public IActionResult Index(){ var model = _service.FindById(1)); model.States = (_lookupService.GetStates()); return View(model);}<select asp-for="StateId" asp-items="Model.States" class="form-control"> <option value=""></option></select>Hello,
In HTML helpers we could for example write:
@(Html.Kendo() .DatePicker() .Name("datepicker") .Deferred())...@section scripts { @Html.Kendo().DeferredScripts()}
To have scripts deferred. How can we accomplish the same thing with tag helpers?
<kendo-datepicker name="datepicker" />
Thanks,
Alaa
I'm looking to customize the paging of the ListView to have an infinite scroll (loading next group when getting to the bottom). Similar to the functionality offered in the grid. Is there any way to achieve this? It kind of looks like the ASP.NET AJAX listview has the ability to customize the pager. Is there any way to go about this?
Thanks

<link rel="stylesheet" href="@Url.Content("~/Content/KendoThemes/kendo.common.min.css")"> <link rel="stylesheet" href="@Url.Content("~/Content/KendoThemes/kendo.rtl.min.css")"> <link rel="stylesheet" href="@Url.Content("~/Content/KendoThemes/kendo.default.min.css")"><script src="@Url.Content("~/Scripts/jquery.min.js")"></script> <script src="@Url.Content("~/Scripts/kendo.web.min.js")"></script> <script src="@Url.Content("~/Scripts/kendo.aspnetmvc.min.js")"></script>@(Html.Kendo().Grid<Nop.Web.Models.Customer.CustomerInfoModel>() .Name("Grid") .Columns(columns => { columns.Bound(p => p.Active); // columns.Bound(p => p.cbSubscriptions).ClientTemplate("#=Employee.EmployeeName#"); columns.Bound(p => p.cbSubscriptions); columns.Bound(p => p.FirstName); columns.Command(command => { command.Edit(); command.Destroy(); }).Width(200); }) .ToolBar(toolBar => toolBar.Create()) .Editable(editable => editable.Mode(GridEditMode.InLine)) .Pageable() .Sortable() .Scrollable() .DataSource(dataSource => dataSource .Ajax() .Events(events => events.Error("error_handler")) .Model(model => model.Id(p => p.Id)) .Create(update => update.Action("EditingInline_Create", "Customer")) .Read(read => read.Action("UsersList", "Customer")) .Update(update => update.Action("EditingInline_Update", "Grid")) .Destroy(update => update.Action("EditingInline_Destroy", "Grid")) ))<script type="text/javascript"> function error_handler(e) { if (e.errors) { var message = "Errors:\n"; $.each(e.errors, function (key, value) { if ('errors' in value) { $.each(value.errors, function () { message += this + "\n"; }); } }); alert(message); } }</script>Hi i am binding my kendo grid with DataTable and trying to display some columns as checkbox using clienttemplate. However every time i am trying i am getting error doing that.
Does anyone know how i can achieve this?
I have attached the mockup of image what im trying to achieve i.e. grid-mockup.jpg.
The error message i get is: Uncaught ReferenceError: ColumnName is not defined
Here is my Razor code:
@using Kendo.Mvc.UI@model System.Data.DataTable@(Html.Kendo().Grid<dynamic>() .Name("Grid") .Columns(columns => { foreach (System.Data.DataColumn column in Model.Columns) { if (column.ColumnName != "SupplierNumber" && column.ColumnName != "CustomerItemNumber") { columns.Bound(column.ColumnName).ClientTemplate("<input type='checkbox' disabled #= ColumnName == 'True' ? checked='checked' : '' # />"); } else { columns.Bound(column.ColumnName); } } columns.Command(cmd => cmd.Edit()); }) .Pageable() .Sortable() .Editable(ed => ed.Mode(GridEditMode.PopUp)) .Filterable() .Groupable() .DataSource(dataSource => dataSource .Ajax() .Model(model => { var id = Model.PrimaryKey[0].ColumnName; model.Id(id); foreach (System.Data.DataColumn column in Model.Columns) { var field = model.Field(column.ColumnName, column.DataType); if (column.ColumnName == id) { field.Editable(false); } } }) .Read(read => read.Action("Read", "Home")) .Update(update => update.Action("Update", "Home")) ))I am trying to get a Kendo DropDownList—declared inside of a Kendo Template script block—to automatically select an item from its list when a data value is provided to the template. I’m not having any luck doing this because I don’t understand how to plumb this particular case. My project has many other Kendo DropDownList controls, and they work just fine, but they are not declared inside of any Kendo Templates.
Basically, I have a parent Kendo Grid with the following declaration (irrelevant Razor omitted for clarity):
@(Html.Kendo().Grid<DocumentUploadViewModel>() .ClientDetailTemplateId("documentUploadTemplate")My intention is to provide an editor template for the grid consisting of a Kendo Template script block. At the moment, that template looks like this:
<script id="documentUploadTemplate" type="text/kendo-tmpl"> <div> <p>ID: ${Id}</p> <p>Document Type ID: ${DocumentTypeId}</p> <p>Document Type Name: ${DocumentTypeName}</p> <p>Path: ${Path}</p> <p>FileName: ${FileName}</p> <p>MIME Type: ${MimeType}</p> </div> <div> @(Html.Kendo().DropDownList() .Name("uxDocumentTypeName#=Id#") .OptionLabel("Please Select...") .DataValueField("DocumentTypeId") .DataTextField("DocumentTypeName") .DataSource(s => { s.Read(r => { r.Action("GetDocumentTypes", "MyController"); }) .ServerFiltering(true); }) .ToClientTemplate() ) </div></script>My parent grid, which is working fine, is bound to a populated DocumentUploadViewModel, and its field values are surfaced in the Kendo Template for debugging purposes. When I invoke my grid’s “edit” button, I see the selected grid item’s bound data appear correctly inside the DIV at the top of the presented template.
The drop-down itself is full of data from the DataSource.Read.Action call, and I can manually make selections. However, I am unsure how to wire the control so that it automatically selects the item specified by the passed-in “DocumentTypeId” field. I do see this field value rendering correctly in the DIV, and the visible ID matches one of the items found in the drop-down’s data.
Normally, I would write @Html.Kendo.DropDownListFor(m => m.DocumentTypeId) but I can’t get at the “model” passed into the Kendo template. I have tried .BindTo("#=DocumentUploadViewModel.DocumentTypeId") as well as other variations, to no avail.
Hello, I am using Kendo Grid on my MVC site. Loading data using AJAX call. But, the data disappears right after loading. Below is a code for Grid control in the view.
@(Html.Kendo().Grid<SomeViewModelClass>()
.Name("criteriaGridDiv")
.AutoBind(false)
.DataSource(datasource => datasource
.Ajax()
.Model(module =>
{
module.Id("ID");
module.Field("ScoreValue", typeof(int));
module.Field("ProjectID", typeof(string));
module.Field("CallMonitoringFormTypeID", typeof(int));
module.Field("FailureOnNotMet", typeof(bool));
})
.Create(create => create.Action("Create_Criteria", "Permission", new { ModuleId = ViewBag.ModuleId }))
.Update(update => update.Action("Edit_Criteria", "Permission", new { ModuleId = ViewBag.ModuleId }))
)
.Columns(columns =>
{
columns.Bound("ID").Visible(false);
columns.Bound("ProjectID").Visible(false);
columns.Bound("CallMonitoringFormTypeID").Visible(false);
columns.Bound("CriteriaStatement").Title("Criteria");
columns.Bound("ScoreValue").Title("Score Value").HtmlAttributes(new { style = "max-width:100px;" });
columns.Bound("FailureOnNotMet").Title("Fail call if Not Met?").ClientTemplate("<input type='checkbox' #= FailureOnNotMet ? checked='checked':'' # class='failureOnNotMetCheck' />");
columns.Command(command => command.Edit()).HtmlAttributes(new { style = "max-width:200px;" });
})
.ToolBar(toolbar => toolbar.Create().Text("Add New Criteria").HtmlAttributes(new { id = "radGridButton" }))
.Editable(editable => { editable.Mode(GridEditMode.InLine); })
.HtmlAttributes(new { style = "max-width:90%;height:500px;" }))
Any thought on what I am missing here?
Thanks in advance.
Kirtan