Hello,
Is there a way to position the items in a Kendo Toolbar so that some buttons are located on the left-side of the toolbar and some on the right side with empty space between?
Thanks,
Shawn A.
Hello,
The column filter icons on my grid are interfering with the column header texts. Sometimes they are right on top of the texts (see attached). How do I position these icons so that they are on the bottom right corner of the column header and away from the header text?
Thanks,
Shawn A.
I am trying to get a value and use it to change a label.
All the examples I have found in documentation include only
the html helper version
I am using the tag helpers and can’t figure out how to do
it.
I tried this:
<script>
function
onSelect(e) {
alert(e.item.Text);
}
</script>
<
kendo-dropdownlist
name
=
"DocumentTypes"
on-select
=
"onSelect"
for
=
"GovIdTypeID"
class
=
"jProfileMod"
datatextfield
=
"Name"
datavaluefield
=
"Id"
bind-to
=
"Model.GovIdTypes"
cascade-from
=
"CountryID"
cascade-from-field
=
"IssuingCountry.Id"
></
kendo-dropdownlist
>
But it is not working.
Hi, Im doing this, but all tools in toolbar are showing? Shouldn't .Clear() do the trick? FYI: Id and body in code below is set from mvc c# variables
@(Html.Kendo().Editor()
.Name(id)
.Events(events => events
.Keyup(change)
)
.Tools(tools => tools.Clear())
.Value(@<text>
@Model.Body
</text>)
)
Hello All, i need an help to resolve the following error. This error occurs after I have added this line of code(columns.Bound(p => p.Id).Title("ID").Hidden(true)) to the grid .
Error I am receiving:
<[Error] An unhandled exception has occurred: One or more compilation failures occurred:
List.cshtml(38,30): error CS1061: 'ListItemViewModel' does not contain a definition for 'Id' and no extension method 'Id' accepting a first argument of type 'ListItemViewModel' could be found (are you missing a using directive or an assembly reference?)
Microsoft.AspNetCore.Mvc.Razor.Compilation.CompilationFailedException: One or more compilation failures occurred:
List.cshtml(38,30): error CS1061: 'ListItemViewModel' does not contain a definition for 'd' and no extension method 'Id' accepting a first argument of type 'DecisionListItemViewModel' could be found (are you missing a using directive or an assembly reference?)
at Microsoft.AspNetCore.Mvc.Razor.Internal.RazorViewCompiler.CompileAndEmit(RazorCodeDocument codeDocument, String generatedCode)
at Microsoft.AspNetCore.Mvc.Razor.Internal.RazorViewCompiler.CompileAndEmit(String relativePath)
at Microsoft.AspNetCore.Mvc.Razor.Internal.RazorViewCompiler.CreateCacheEntry(String normalizedPath)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Razor.Internal.DefaultRazorPageFactoryProvider.CreateFactory(String relativePath)
at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.CreateCacheResult(HashSet`1 expirationTokens, String relativePath, Boolean isMainPage)
at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.LocatePageFromPath(String executingFilePath, String pagePath, Boolean isMainPage)
at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.GetView(String executingFilePath, String viewPath, Boolean isMainPage)
at Microsoft.AspNetCore.Mvc.ViewEngines.CompositeViewEngine.GetView(String executingFilePath, String viewPath, Boolean isMainPage)
at Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ViewResultExecutor.FindView(ActionContext actionContext, ViewResult viewResult)
at Microsoft.AspNetCore.Mvc.ViewResult.<ExecuteResultAsync>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeResultAsync>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextResultFilterAsync>d__24.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResultExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextResourceFilter>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeFilterPipelineAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeAsync>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Builder.RouterMiddleware.<Invoke>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at CPAS.Web.Startup.<>c.<<Configure>b__8_3>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at CPAS.Web.Startup.<>c__DisplayClass8_0.<<Configure>b__2>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Session.SessionMiddleware.<Invoke>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Session.SessionMiddleware.<Invoke>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.<Invoke>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>d__6.MoveNext()>
My code:
<use the editor's "Insert code sample" functionality to insert a minimal amount of code which reproduces the problem>
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Razor.Internal.DefaultRazorPageFactoryProvider.CreateFactory(String relativePath)
at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.CreateCacheResult(HashSet`1 expirationTokens, String relativePath, Boolean isMainPage)
at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.LocatePageFromPath(String executingFilePath, String pagePath, Boolean isMainPage)
at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.GetView(String executingFilePath, String viewPath, Boolean isMainPage)
at Microsoft.AspNetCore.Mvc.ViewEngines.CompositeViewEngine.GetView(String executingFilePath, String viewPath, Boolean isMainPage)
at Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ViewResultExecutor.FindView(ActionContext actionContext, ViewResult viewResult)
at Microsoft.AspNetCore.Mvc.ViewResult.<ExecuteResultAsync>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeResultAsync>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextResultFilterAsync>d__24.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResultExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextResourceFilter>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeFilterPipelineAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeAsync>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Builder.RouterMiddleware.<Invoke>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at CPAS.Web.Startup.<>c.<<Configure>b__8_3>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at CPAS.Web.Startup.<>c__DisplayClass8_0.<<Configure>b__2>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Session.SessionMiddleware.<Invoke>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Session.SessionMiddleware.<Invoke>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.<Invoke>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>d__6.MoveNext()
My code:
@(Html.Kendo().Grid<ListItemViewModel>().Name("grid").Columns(columns =>{ columns.Bound(p => p.Name);
columns.Bound(p => p.Id).Title("ID").Hidden(true);}).Pageable(pageable => pageable
.Refresh(true).PageSizes(new int[] { 10, 20, 50, 100 })).Groupable(false).Scrollable().ColumnMenu().Selectable(s => s.Mode(GridSelectionMode.Single)).Sortable(s => s.SortMode(GridSortMode.MultipleColumn)).Filterable(filterable => filterable.Mode(GridFilterMode.Menu)).ClientDetailTemplateId("template").Events(events => events.Change("onChange")).HtmlAttributes(new { style = "margin-top:10px;height:400px;margin-bottom:35px;" }).DataSource(dataSource => dataSource
.Ajax().PageSize(20).Events(events => events.Error("error_handler")).Model(model =>{ model.Id(p => p.Id);}).Read(read => read.Action("Get", "Lists").Data("getFilters"))).Deferred())
I want to show a Kendo window, type something in a textbox in the window, and return the value from to the parent page. How can I do this?
My window definition.
<
kendo-window
name
=
"InstallerSearch"
title
=
"Search for Installer"
draggable
=
"true"
resizable
=
"true"
width
=
"1100"
height
=
"550"
modal
=
"true"
visible
=
"false"
on-close
=
"onClose"
actions
=
"actions"
iframe
=
"true"
>
<
content
>
loading...
</
content
>
<
popup-animation
enabled
=
"true"
/>
</
kendo-window
>
JavaScript to open window
function
selectInstaller() {
var
window = $(
"#InstallerSearch"
).data(
"kendoWindow"
);
window.refresh({
url:
"@Url.Content("
/Admin/Installers/Search/
")"
});
window.open();
window.center();
}
Razor page content for the window
Installer Name<
br
/>
<
input
name
=
"InstallerName"
id
=
"InstallerName"
type
=
"text"
class
=
"form-control-md"
/>
JavaScript for the close where I want to get the value in the textbox in the window but user input is undefined.
function
onClose() {
var
userinput = $(
"#InstallerName"
).val();
alert(userinput);
}
Hello,
I am using a Kendo Toobar in RTL mode, and I have a couple of SplitButtons on it. I have two questions:
1- Since the Toolbar is set to display its contents in Right-to-Left (RTL) mode, the drop-down arrows for the SplitButtons are displaying on the left side (which is understandable). However, I would like these arrows to display on the right side of the SplitButtons. How can I achieve this?
2- There is a line separating the drop-down arrow and its text (please see image). How do I remove this line so that it's one smooth box?
Thanks,
Shawn A.
Hi All,
I created a simple project using the Telerik grid template. In my script, I update "Freight" to zero for the selected row. However, I want to set ALL ROWS that match the CustomerID of the selected row to zero.
Here are the peices:
VIEW
@{
ViewData["Title"] = "Home Page";
}
<
div
class
=
"row"
>
<
div
class
=
"col-xs-18 col-md-12"
>
@(Html.Kendo().Grid<
TelerikAspNetCoreApp3.Models.OrderViewModel
>()
.Name("grid")
.Selectable()
.Editable(editable => editable.Mode(GridEditMode.InCell))
.Events(events =>
{
events.Change("onSelectedRow");
})
.Columns(columns =>
{
columns.Bound(p => p.CustomerID)
.ClientGroupHeaderColumnTemplate("CustomerID");
columns.Bound(p => p.OrderID);
columns.Bound(p => p.Freight);
})
.Pageable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
.Group(groups =>
{
groups.Add(g => g.CustomerID);
})
.Model(model =>
{
model.Field(p => p.OrderID).Editable(false);
model.Field(p => p.CustomerID).Editable(false);
})
)
)
)
</
div
>
</
div
>
<
script
>
function onSelectedRow(e) {
var gview = $("#grid").data("kendoGrid");
var selectedItem = gview.dataItem(gview.select());
var custId = selectedItem.CustomerID;
//I want to update ALL freight fields to 0 where CustomerID equals custId, not just the selectedItem
selectedItem.set("Freight", 0); //Fix or update this to update all rows
}
</
script
>
MODEL
namespace TelerikAspNetCoreApp3.Models
{
public class OrderViewModel
{
public int OrderID {get;set;}
public double CustomerID{get;set;}
public decimal? Freight{get;set;}
}
}
CONTROLLER
namespace TelerikAspNetCoreApp3.Controllers
{
public class GridController : Controller
{
public ActionResult Orders_Read([DataSourceRequest]DataSourceRequest request)
{
var result = Enumerable.Range(0, 50).Select(i => new OrderViewModel
{
CustomerID = (i+100)/10,
OrderID = i,
Freight = i * 10
});
var dsResult = result.ToDataSourceResult(request);
return Json(dsResult);
}
}
}
If this is completely the wrong approach, I'll take ideas for a better/easier solution.
Thank you in advance!
I want to display a line on the value axis of my bar chart. When using JS it can be done like this:
valueAxis: {
notes: {
line: {
length: 340,
width: 3,
color:
"#ff0000"
},
data: [{value: 730, label: {text:
"mid"
}}]
}
},
But when using a TagHelper I am missing the "data: [...]" part. How can I tell the notes-taghelper where to draw the line?
<value-axis>
<value-axis-item>
<notes>
<chart-value-axis-notes-line length=
"340"
width=
"3"
/>
</notes>
</value-axis-item>
</value-axis>
Hello,
Is posible to override behavior when multiple option is set, to not holding CTRL button to select multiple dates. I want user to use this behavior as default just by normal mouse click on dates.
Thanks.