Hey guys,
I have a problem with my HtmlHelper. My ButtonBuilder does not contain a definition for ThemeColor (like described on your demo page here). Funny is that my KendoLoader does have that. Any suggestions (see my picture)?
I had that error with the Kendo Release R3 2021 and currently I've updated to the current last version (2022.1.119) through Progress Control Panel and still it is.
FYI: @using Kendo.Mvc.UI is in my _ViewImports included. There is no change when I implement that code line into my current view.
@(Html.Kendo().Loader()
.Name("loaderDropDown")
.Size(LoaderSize.Medium)
.ThemeColor(LoaderThemeColor.Dark)
.Type(LoaderType.InfiniteSpinner)
.Visible(false)
)
@(Html.Kendo().Button()
.Name("btnEditPrivacy")
.Icon("edit")
.HtmlAttributes(new { style = "min-width: 27px;", title = "Datenschutzerklärung bearbeiten" })
.ThemeColor(ThemeColor.Primary)
)
Edit:
Alright guys, it was my fault. I forgot to update my telerik nuget package. Now it's working! Thanks anyways!
I am struggling to understand how to handle create operations when ListView contents must be associated with a parent object. To demonstrate by using examples from your docs, let's say the orders are part of a store object:
public class StoreViewModel
{
public int StoreID {get; set;}
IEnumerable<OrderViewModel> StoreOrders {get; set;}
// various other fields
}
My goal is to have a View, Model type is the StoreViewModel, and a ListView showing the Orders from a specific store. The Create function of the ListView would need to know the store ID and have it passed somehow. I think I need something like this:
@model StoreViewModel
@(Html.Kendo().ListView<OrderViewModel>()
.DataSource(ds => ds
.Ajax()
.Model(m => m.("OrderID")
.Read(read => read
.Action("Orders_Read", "ListView")
.Data(@<text>@Html.Raw(Json.Serialize(Model))</text>)
)
.Create(create => create
.Action("Orders_Create", "ListView")
.Data(@<text>@Html.Raw(Json.Serialize(Model))</text>)
)
)
)
The controller has this method for read, which works perfectly:
public ActionResult Orders_Read([DataSourceRequest]DataSourceRequest request, StoreViewModel store)
{
// code that returns orders from one store
}
However, when I try to create, the same .Data parameter doesn't seem to be passed:
public ActionResult Orders_Create([DataSourceRequest]DataSourceRequest request, StoreViewModel store)
{
// misc code to make a new order and add to DB goes here
newOrder.StoreID = store.StoreID; // this fails
}
When looking through this with the debugger, "store" is populated in the Orders_Read method, but is null in the Orders_Create method, even though I'm trying to use them the same way. While that's concerning, I suspect there's an overall better way to do this period. Are there any examples that show similar scenarios with related models/objects?
Good afternoon,
I have updated to the latest version of Telerik ASP.NET Core (2022.1.119).
The scrollbars are missing from the 'View HTML' window. Even the online demo is the same.
All tools in ASP.NET Core Editor Component Demo | Telerik UI for ASP.NET Core
Previously it looked like this:
Is there a fix for this?
Kind regards,
Richard
Good afternoon,
I am using the latest version of Telerik ASP.NET Core (2022.1.119).
I am using the classic opal theme on my site. I have a responsive menu which collapses to the hamburger.
If I reference the common css file first the menus don't wrap correctly when the page width is reduced.
<link rel="stylesheet" href="~/lib/kendo/css/kendo.common.min.css" />
<link rel="stylesheet" href="~/lib/kendo/css/kendo.classic-opal.min.css" />
This configuration gives this:
Switching the configuration so that common css is after the classic opal theme makes it work:
However, having the common css second breaks the tabstrips - the outer borders of the tab no longer display, only the header tabs:
If I'm using kendo.classic-opal.min.css do I also need to use kendo.common.min.css, and if I do, why does this break the tabstrip? Apart from site.css, is there another css I need to reference?
Kind regards,
Richard
Hi,
Just updated from 2021.3.1207 to 2022.1.119 (VS2022 and .NET6) and all my checkboxes used in templates on all pages are not working any more.
This code:
<script id="toolbar" type="text/x-kendo-template">
<div id="blockSyncArea">
@(Html.Kendo().CheckBox().Name("blockSync").Enable(ViewBag.BlockSyncStatus.AllowUnblock).Checked(!ViewBag.BlockSyncStatus.BlockSync).Label("Sync Enabled").HtmlAttributes(new
{
onchange = "onBlockSyncChanged();",
title = "Toogle to enable or disabled syncing with clients while editing."
}))
</div>
}
</script>
Renders like this in 2021.3.1207 (seems to be plain HTML5) and works correctly without any problems:
<script id="toolbar" type="text/x-kendo-template">
<div id="blockSyncArea">
<input checked="checked" class="k-checkbox" id="blockSync" name="blockSync" onchange="onBlockSyncChanged();" title="Toogle to enable or disabled syncing with clients while editing." type="checkbox" value="true" /><label class="k-checkbox-label" for="blockSync">Sync Enabled</label><input name="blockSync" onchange="onBlockSyncChanged();" title="Toogle to enable or disabled syncing with clients while editing." type="hidden" value="false" />
</div>
</script>
But renders like this in 2022.1.119 and does not work and mess up my pages:
<script id="toolbar" type="text/x-kendo-template">
<div id="blockSyncArea">
<input id="blockSync" name="blockSync" onchange="onBlockSyncChanged();" title="Toogle to enable or disabled syncing with clients while editing." type="checkbox" value="true" /><input name="blockSync" onchange="onBlockSyncChanged();" title="Toogle to enable or disabled syncing with clients while editing." type="hidden" value="false" /><script>kendo.syncReady(function(){jQuery("#blockSync").kendoCheckBox({"checked":true,"label":"Sync Enabled","enabled":true});});</script>
</div>
</script>
Clearly there has been a change using a kendoCheckBox function instead.
I get these errors in Chrome:
Uncaught SyntaxError: Unexpected token '<'
Uncaught Error: Invalid template:'
<div id="blockSyncArea">
<input id="blockSync" name="blockSync" onchange="onBlockSyncChanged();" title="Toogle to enable or disabled syncing with clients while editing." type="checkbox" value="true" /><input name="blockSync" onchange="onBlockSyncChanged();" title="Toogle to enable or disabled syncing with clients while editing." type="hidden" value="false" /><script>kendo.syncReady(function(){jQuery("#blockSync").kendoCheckBox({"checked":true,"label":"Sync Enabled","enabled":true});});' Generated code:'var $kendoOutput, $kendoHtmlEncode = kendo.htmlEncode;with(data){$kendoOutput='\n <div id="blockSyncArea">\n <input id="blockSync" name="blockSync" onchange="onBlockSyncChanged();" title="Toogle to enable or disabled syncing with clients while editing." type="checkbox" value="true" /><input name="blockSync" onchange="onBlockSyncChanged();" title="Toogle to enable or disabled syncing with clients while editing." type="hidden" value="false" /><script>kendo.syncReady(function(){jQuery("';blockSync").kendoCheckBox({"checked":true,"label":"Sync Enabled","enabled":true});});;$kendoOutput+=;}return $kendoOutput;'
at Object.compile (kendo.all.js:238:31)
at Object.i [as template] (jquery.min.js:2:88736)
at HTMLDocument.<anonymous> (Index:671:4117)
at e (jquery.min.js:2:30005)
at t (jquery.min.js:2:30307)
Please advise, what is the problem with my very simple code. I strongly suspect a bug in the rendering, since I use the checkboxes in kendo templates and in the error message there seems to be a invalid rendering of jQuery("';blockSync") at the end, that should be #blockSync?
Regards,
Mattias
Hey guys,
does there anywhere exist a working example for a kendo grid which has all the crud operations enabled and is fully accessable via keyboard? I know you have on your demo page a full example for keyboard navigation but there aren't existing crud operations -> https://demos.telerik.com/kendo-ui/grid/keyboard-navigation
Would be nice if there are already some informations how to implement a full keyboard support. If not, well then I have to figure everything out how to access userfriendly all the crud operations.
Thank you!
Daniel
Hi Team,
We follow your example : https://docs.telerik.com/kendo-ui/knowledge-base/retrieve-visible-grid-columns-data-with-select-odata-parameter.
We just replace with our API endpoint and columns fields. Its returns only 20 records first page of records. Rest of the records not showing.
API returns json format.
[
{
"workflowId": 48,
"id": 177,
"workflowName": "Observations",
},
{
"workflowId": 64,
"id": 178,
"workflowName": "IncidentManagement",
},
{
"workflowId": 64,
"id": 183,
"workflowName": "IncidentManagement",
},
{
"workflowId": 64,
"id": 185,
"workflowName": "IncidentManagement",
},
]
-----------------------------------------
Hello,
I have a page that is correctly populating a DropDownList with a list of customers as shown below:
<kendo-dropdownlist for="CustomerIdValue"
name="customers"
filter="FilterType.Contains"
placeholder="Select customer"
datatextfield="Display"
datavaluefield="Value"
style="width: 100%;">
<datasource type="DataSourceTagHelperType.Custom">
<transport>
<read url="@Url.Action("CustomersInternal_GET", "User")" />
</transport>
</datasource>
</kendo-dropdownlist>
Unfortunately the dropdownlist be default selects the first customer in its list.
I _don't_ want the dropdown to have a selected item when the page loads. In this particular form I want the user to be forced to select a customer. How do I 1) get the initial load to not select an item 2) check the user has selected a customer from the list before I enable the Submit button.
Yes, a user MUST be forced to actually choose a customer from the dropdownlist.
Thank you kindly!