HTML
<input type="checkbox" id="chkShowPopEventDay" />
JavaScript
$("#chkShowPopEventDay").kendoCheckBox({
label: "ShowPopEventDay",
checked: true,
});
I tried to use the check box by referring to the address, but the message appears as follows. Is there anything wrong?
Reference URL: https://demos.telerik.com/kendo-ui/checkbox/index
I have an app thats working with SignalR grids, but now we want to add bearer auth.
The token handling stuff has to happen before my SignalR promise is set, but the problem is the Kendo components required the SignalR promise to bind.
How can I set a SignalR promise that the Kendo components can use which will not resolve until my own token handling functions are complete?
Here is a sample of what we're doing:
getTokenPopup({ scopes: ["api://918c95d7-8c39-4486-9e15-83d061a30fa6/access_as_user"] }) .then(response => { $.ajaxSetup({ beforeSend: function (xhr) { xhr.setRequestHeader('Authorization', 'Bearer ' + response.accessToken); } }); myApp.hub = $.connection.searchHub; myApp.hubStart = $.connection.hub.start({ waitForPageLoad: false, transport: "longPolling" }); }) .catch(error => { console.error(error); });
Open the search box. The default condition is fuzzy query, not equal to
If I have the following piece of code on a cshtml view
<div>
@{ Html.BeginForm("test"); }
</div>
@Html.Kendo().NumericTextBox().Name("kendo")
<input name="native" type="text" />
<button type="submit">go</button>
@{ Html.EndForm(); }
When I submit the form, the native input value is on the form data, but not the kendo one.
If I remove the div around the BeginForm, it will submit.
Html.EditorFor controls also include their values on the form data, even on the case of incorrectly closed form tags.
Is this by design? If so, it should be documented as it is different than the native behavior.
If not, then it should be aligned with the native behavior.
Using Kendo.MVC 2022.3.913.545
I filled in the G2 unable to trigger formula. Who can tell me
Model for the Tag property is of complex type object
[UIHint("TaskTagEditor")]
public List<NameId> TaskTags { get; set; }
// Class ----
public class NameId
{
public int Id { get; set; }
public string Name { get; set; }
}
Kendo grid field:
columns.Bound(p => p.TaskTags).Width(240).ClientTemplate("#=taskTagsTemplate(TaskTags)#").EditorTemplateName("TaskTagEditor").Title("Tasks") .Filterable(p => p.Multi(true) .CheckAll(false) .ItemTemplate("TaskTagsFilterItemTemplate") .DataSource(d => { d.Read(read => read.Action("GetTaskTagsEditor", "TaskManager")); }) );
Client Template and Item template js:
function taskTagsTemplate(data) {
var template = "";
for (var i = 0; i < data.length; i++) {
template += (data.length == 1 || i == 0) ? data[i].Name : ("," + data[i].Name);
}
return template;
}
function TaskTagsFilterItemTemplate(e) {
return "<span><label><input class='tag-filter-input' type='checkbox' name='" + e.field + "' value='#= Id #'/><span>#= Name #</span></label></span><br/>"
}
Editor :
GetTaskTagsEditor
@model List<GrapeTree.Core.Model.TaskManager.NameId>
@(Html.Kendo().MultiSelectFor(m => m)
.DataTextField("Name")
.DataValueField("Id")
.AutoBind(false)
.TagMode(MultiSelectTagMode.Multiple)
.DataSource(d =>
{
d.Read(read => read.Action("GetTaskTagsEditor", "TaskManager"));
})
)
Controller method for option:
public ActionResult GetTaskTagsEditor() {
var tagList = _taskManager.GetActiveTaskTags()
.Select(tag => new NameId
{
Id = tag.Id,
Name = tag.Name
}).OrderBy(x => x.Name);
var jsonSerializerSettings = new JsonSerializerSettings { ContractResolver = new DefaultContractResolver() };
var json = JsonConvert.SerializeObject(tagList.ToList(), Formatting.Indented, jsonSerializerSettings);
return Content(json, "application/json");
}
Incell Editor is working fine and Filter about to bind with muti select value but filtering doesn't work for this complex object
Hi ,
We have a validation related requirement on the datepicker control. The datepicker control should not allow alphabets or special chars to be keyed in. It should allow only numerics, backspace and forward slaces keys for example: 10/10/2022.
The requirement is to validate it as soon as its keyed in instead of when the control lose focus.
Because datepicker control does not have keydown/key press event, I added a jquery script as below and it works fine but we dont want to repeat the script for all the date pickers controls on different screens across the project. Is there any feature of the control it self that can be used everywhere??
Thanks,
Chhavi
I have a grid that I want to be an Ajax grid (not Server) but I need to render one of the cells using ASP.NET MVC partials. Looks somewhat like this:
@(Html.Kendo().Grid(Model.Items)
.Name("items")
.Columns(columns =>
{
columns.Bound(p => p.Payload).Template(@<text>
@Html.Partial(item.ItemUI, item.Payload)
</text>).ClientTemplate("@output");
})
.DataSource(dataSource => dataSource
.Ajax()
)
)
Is that possible to instruct Kendo to output the result of a call to Template() in ClientTemplate()? In the example above, is there some magic keyword I can use instead of the highlighted @output to say "output whatever was generated on the server side here?"
Thanks
I have a partial MVC view called _user.cshtml that displays some basic information about a user:
@model UserVM
<p>
<span>Name: </span>@Model.Name
<span>Email: </span>@Model.Email
</p>
In the parent view I have an MVC Kendo Grid:
@model ImportUsersVM
@(Html.Kendo().Grid(Model.Items)
.Name("ImportUsers")
.Columns(columns =>
{
columns.Bound(i => i.Status);
columns.Template(i => Html.RenderPartial("_user", i.Payload));
})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(100)
.ServerOperation(false)
)
)
The highlighted line above doesn't work -- the user information is not rendered.
How can I include an MVC partial on each row of the grid?
Thank you