Hello I'm using Grid and my qiestuon is : Is there any way to remove video-wrapper from DOM ?
Greetings
Hey there,
I am new to learn Telerik. My internship is probably going to give me the task to build charts for their apps.
I've been looking around in VS to put those demo's in. But it is still unclear for me where to put it in.
So my question is, can someone help me with this? If you can reply that would be awesome! (or add me on discord: bjeako#1286)
Hi, I'm having a problem on rendering my listbox every time I call my modal.
Please see the attached file.
here's my code:
<div class="modal fade" id="assign-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div class="modal-dialog" role="document" style="max-width:790px!important;"> <div class="modal-content"> <div class="modal-header" style="display:block"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title" id="myModalLabel">t</h4> </div> <div class="modal-body"> <input type='text' id='searchBox' class='k-textbox' placeholder='Search' /> <div id="example" role="application"> <div class="demo-section k-content"> <div> <label for="optional" id="agents">FROM</label> <label for="selected">TO</label> <br /> <select id="unoptional"></select> <select id="unselected"></select> </div> </div> </div> </div> <div class="modal-footer"> <button id="SaveEdit" type="button" data-save class="btn btn-primary">Assign</button> <button type="button" class="btn btn-default" data-cancel>Cancel</button> </div> </div> </div></div>
$("#optional").kendoListBox({ connectWith: "selected", dataTextField: "FullName", dataValueField: "FullName", selectable: "multiple", toolbar: { tools: ["transferTo", "transferFrom", "transferAllTo", "transferAllFrom"] }, dataSource: { serverPaging: true, transport: { read: { url: myUrl, dataType: "json" }, schema: { model: { fields: { FullName: { type: "string" }, Id: { type: "string" } } } } } } }); $("#selected").kendoListBox({ dataTextField: "FullName", dataValueField: "FullName", selectable: "multiple", });

Hi,
I have a grid inside a partial view that is bound to a local data (parent viewmodel is passed to the partial view).
The grid displays correctly the datas but when i try to edit a cell, i have this error: 'TypeError: Cannot read property 'Label' of undefined'.
Is there a way to solve this error?
Thanks;
I am using the 2018.1.221 Kendo UI for .Net Core. It is a ASP MVC Core app using .net core 2.
This is a grid with Ajax source - the part having issues is here:
.DataSource(dataSource => dataSource
.Ajax()
.Aggregates(a =>
{
a.Add(l => l.Balance).Sum();
})
.Read(read => read.Action("Balances_Read", "Balances").Data("getAccountType"))
.PageSize(250)
)
This works fine on my development machine (and on a different site hosted on Azure) but on this particular app service I get this exception. The exception goes away if I remove the aggregates code. Here is the stack trace upstream from my call:
System.Exception: Unable to build typeDynamicClass3
at Kendo.Mvc.Infrastructure.Implementation.ClassFactory.EmitType(String typeName, CSharpCompilation compilation)
at Kendo.Mvc.Infrastructure.Implementation.ClassFactory.GetDynamicClass(IEnumerable`1 properties)
at Kendo.Mvc.Infrastructure.Implementation.Expressions.GroupDescriptorExpressionBuilder.CreateProjectionNewExpression(IEnumerable`1 propertyValuesExpressions)
at Kendo.Mvc.Infrastructure.Implementation.Expressions.GroupDescriptorExpressionBuilder.CreateProjectionInitExpression()
at Kendo.Mvc.Infrastructure.Implementation.Expressions.GroupDescriptorExpressionBuilder.CreateAggregateFunctionsProjectionMemberBinding()
at Kendo.Mvc.Infrastructure.Implementation.Expressions.QueryableAggregatesExpressionBuilder.<CreateMemberBindings>d__3.MoveNext()
at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
at System.Dynamic.Utils.CollectionExtensions.ToReadOnly[T](IEnumerable`1 enumerable)
at System.Linq.Expressions.Expression.MemberInit(NewExpression newExpression, IEnumerable`1 bindings)
at Kendo.Mvc.Infrastructure.Implementation.Expressions.GroupDescriptorExpressionBuilder.CreateSelectBodyExpression()
at Kendo.Mvc.Infrastructure.Implementation.Expressions.GroupDescriptorExpressionBuilder.CreateSelectExpression()
at Kendo.Mvc.Infrastructure.Implementation.Expressions.GroupDescriptorExpressionBuilderBase.CreateQuery()
at Kendo.Mvc.Extensions.QueryableExtensions.Aggregate(IQueryable source, IEnumerable`1 aggregateFunctions)
at Kendo.Mvc.Extensions.QueryableExtensions.CreateDataSourceResult[TModel,TResult](IQueryable queryable, DataSourceRequest request, ModelStateDictionary modelState, Func`2 selector)
at Bryt.Client.Web.Controllers.BalancesController.Balances_Read(DataSourceRequest request, Int32 accountType) in C:\DataDrive\Working\Bryt\Bryt.Client.Web\Controllers\BalancesController.cs:line 65
Again, oddly, this is isolated to running on Azure.
Thanks,
Brian
Hi
We started using Asp.net Core MVC components and have question regarding the tag helpers and wrappers and which to use.
Which one we need to use and when :
Tag helpers vs Server side wrappers?
Can you please explain when we need to use any one of these and in which we need to use them?? thanks .
Hi, I was able to embed video using my own template and on change event under image browser.
change: function () {
var editor = $('#editor').data("kendoEditor");
var template = kendo.template($("#video-template").html());
var filename = $(".k-imagebrowser").find(".k-state-selected").children("strong").text();
var range = editor.getRange();
editor.selectRange(range);
editor.exec("insertHtml", { value: template({ source: $(".k-imagebrowser").data("kendoImageBrowser").dataSource.data()[0].blob + '/' + filename })});
}
but after the insert button click, it clears any content inside the editor.

I have already raised an issue on Stack Overflow about this and it is worth extending my enquiries here before my head explodes from the constant banging against my desk...
It's a simple question which will allow me to refactor my code (or not) before I pass an IQueryable to the toDataSource() method.
Does toDataSource() use async methods internally?
I am having problems with second operation on the context with a nested code block called from within my IQueryable. The Stack Overflow post will explain in more depth.
Thanking anyone who can help in advance!

I've created a ViewComponent which shows details of a budget. I pass the budget details model into to the ViewComponent, which works displaying the info, but once I make a change to the cost column (only column you can change). and Click the Save toolbar button... nothing happens.. except the grid is now empty and I see a busy indicator which never stops. I based my code on the batch example found here: https://docs.telerik.com/aspnet-mvc/helpers/grid/editing/batch-editing Any help would be appreciated.
bud_detailsController:
public ActionResult Editing_Read([DataSourceRequest] DataSourceRequest request) { IQueryable<bud_details> budgets = _context.Bud_Details; DataSourceResult result = budgets.ToDataSourceResult(request); return Json(result); } //[AcceptVerbs("Post")] public ActionResult Editing_Update([DataSourceRequest] DataSourceRequest request, [Bind(Prefix = "models")]IEnumerable<bud_details> budget) { var entities = new List<bud_details>(); if (budget != null && ModelState.IsValid) { foreach (var bud in budget) { // _context.Update(budget); var entity = new bud_details { budget_no = bud.budget_no, code = bud.code, cost = bud.cost, description = bud.description, u_key = bud.u_key, project_no = bud.project_no, id = bud.id, section = bud.section }; entities.Add(entity); _context.Bud_Details.Attach(entity); _context.Entry(entity).State = EntityState.Modified; } _context.SaveChanges(); } return Json(entities.ToDataSourceResult(request, ModelState, p => new bud_details { budget_no = p.budget_no, code = p.code, cost = p.cost, description = p.description, u_key = p.u_key, project_no = p.project_no, id = p.id, section = p.section })); }
The ViewComponent:
@(Html.Kendo().Grid(@Model.BudgetDetails) .Name("BudgetGrid") .Columns(columns => { columns.Bound(p => p.u_key).Visible(false); columns.Bound(p => p.budget_no).Visible(false); columns.Bound(p => p.code).Width(100); columns.Bound(p => p.description); columns.Bound(p => p.cost).Width(200) .ClientFooterTemplate("Grand Tot: #= kendo.toString(sum, 'C') #") .ClientGroupFooterTemplate("Tot: #= kendo.toString(sum, 'C') #"); }) .ToolBar(toolbar => { toolbar.Save(); //toolbar.Pdf(); }) .Editable(editable => editable.Mode(GridEditMode.InCell)) // .Pageable(p => p.Numeric(false).PreviousNext(false)) //.HtmlAttributes(new { style = "height:550px;" }) //.Navigatable() .Sortable() .Scrollable(sc => sc.Endless(true)) .Filterable() .DataSource(dataSource => dataSource .Ajax() .Batch(true) .ServerOperation(false) .Aggregates(aggregates => { aggregates.Add(p => p.cost).Sum(); }) .Group(groups => groups.Add(p => p.Category)) .Events(events => events.Error("error_handler")) .Model(model => { model.Id(p => p.u_key); model.Field(p => p.code).Editable(false); model.Field(p => p.description).Editable(false); }) .Read(read => read.Action("Editing_Read", "bud_details")) .Update(update => update.Action("Editing_Update","bud_details")) ))
P.S. I put breakpoints in "Editing_Read" and "Editing_Update" and they never get hit. I don't know why they are not being called.
Lester

Hi,
I am using TagHelpers to create multiselects in my form. I need to provide custom filtering function to filter my data by two fileds e.g FirstName and LastName (contains FirstName OR contains LastName). How can I do that?
