We are setting up a new razor page using ListView following this sample (https://docs.telerik.com/aspnet-core/html-helpers/data-management/listview/binding/razor-page), with onChange event and all is working as expected.
We wanted to incorporate Grouping as well (https://demos.telerik.com/aspnet-core/listview/grouping) bringing in the grouping jQuery, .AutoBind(false), template, and css. When selecting a card, it selects the outside group, not the individual cards. Does anyone know if grouping and selecting individual cards are supported in Razor? If so, can someone provide some insight?
$(function () {
var groupDetails = {
field: 'RoomDescription',
dir: 'desc',
compare: function (a, b) {
if (a.items.length === b.items.length) {
return 0;
} else if (a.items.length > b.items.length) {
return 1;
} else {
return -1;
}
}
}
var listView = $("#listview").data("kendoListView");
//var listView = $("#listView").data().kendoListView;
var dataSource = listView.dataSource;
dataSource.group(groupDetails);
});@(Html.Kendo().ListView<spRoomAvailabilityResult>()
.Name("listview")
.TagName("div")
.ClientTemplateId("template")
.Selectable(ListViewSelectionMode.Single)
.Events(events => events.Change("onChange").DataBound("onDataBound"))
.AutoBind(false)
.DataSource(ds => ds
.Ajax()
.Model(model => {
model.Id(p => p.ROOMID);
})
.Read(read => read.Url("/MyWebPage?handler=Read").Data("forgeryToken"))
)
)
<script>
function forgeryToken() {
return kendo.antiForgeryTokens();
}
$(document).ready(function () {
var listView = $("#listview").data("kendoListView");
$(".k-add-button").click(function (e) {
listView.add();
e.preventDefault();
});
});
</script>
<script>
function onChange(arg) {
var selected = $.map(this.select(), function (item) {
return $(item).text();
});
alert(selected);
}
</script><script type="text/x-kendo-template" id="template">
<div class="k-listview-item">
<h4 class="k-group-title">#= data.value #</h4>
<div class="cards">
# for (var i = 0; i < data.items.length; i++) { #
<div class="k-card" style="width: 15em; margin:2%">
<div class="k-card-body">
<h4 class="k-card-title">#= data.items[i].ROOMNUMBER #</h4>
<h5 class="k-card-subtitle">Capacity: #= data.items[i].CAPACITY #</h5>
</div>
</div>
# } #
</div>
</div>
</script>Hi there,
I have a custom command column in my grid, as follows...
.Columns(columns =>{ columns.Bound(b => b.Created_DisplayString); columns.Bound(b => b.Closed_DisplayString); columns.Command(command => command.Custom("Close or ReOpen").Click("onCloseReOpen"));})
My viewmodel has a (readonly) property that returns either "Close" or "ReOpen" (as appropriate)
public string CloseOrReOpen{ get { return (Closed_DateTime.HasValue ? "ReOpen" : "Close"); }}
How can I bind the text of the Command button to this property pls. (instead of the current "Close or ReOpen")?
Thx,
Erik

Hello i have a Kendo core grid that has inline edit mode turned on with create update and destroy.
What i am trying to do is get the required validator to fire when you create/update and to my understanding you're supposed to use the [Required] attribute on the model that's populating the grid.
The problem is when i do that, my grid doesn't load, instead it immediately get an error saying X field is required and then my grid is left showing nothing in the datasource.
Note: The controller returns sucessfully
What is the issue?
Grid implementation:
@(Html.Kendo().Grid<AccessControlsModel>()
.Name("kgAdmin")
.Columns(columns =>
{
columns.Bound(col => col.PermissionID).Width(50).Hidden(true);
columns.Bound(col => col.UserID).Width(100);
columns.Bound(col => col.Initials).Width(50);
columns.Bound(col => col.Country).Width(50).ClientTemplate("#=Country#");
columns.Bound(col => col.Admin).Width(50).ClientTemplate("<input type='checkbox' #= Admin ? checked='checked':'' # class='chkbx admin'/>").Editable(@<text> function(e){ return false; } </text>);
columns.Bound(col => col.PendingStatus).Width(50).ClientTemplate("<input type='checkbox' #= PendingStatus ? checked='checked':'' # class='chkbx pendingstatus' />").Editable(@<text> function(e){ return false; } </text>);
columns.Bound(col => col.BOM).Width(50).ClientTemplate("<input type='checkbox' #= BOM ? checked='checked':'' # class='chkbx bom' />").Editable(@<text> function(e){ return false; } </text>);
columns.Bound(col => col.ProcessSheet).Width(50).ClientTemplate("<input type='checkbox' #= ProcessSheet ? checked='checked':'' # class='chkbx processsheet' />").Editable(@<text> function(e){ return false; } </text>);
columns.Bound(col => col.Matrix).Width(50).ClientTemplate("<input type='checkbox' #= Matrix ? checked='checked':'' # class='chkbx matrix' />").Editable(@<text> function(e){ return false; } </text>);
columns.Bound(col => col.Quality).Width(50).ClientTemplate("<input type='checkbox' #= Quality ? checked='checked':'' # class='chkbx quality' />").Editable(@<text> function(e){ return false; } </text>);
columns.Bound(col => col.Process).Width(50).ClientTemplate("<input type='checkbox' #= Process ? checked='checked':'' # class='chkbx process' />").Editable(@<text> function(e){ return false; } </text>);
columns.Bound(col => col.Release).Width(50).ClientTemplate("<input type='checkbox' #= Release ? checked='checked':'' # class='chkbx release' />").Editable(@<text> function(e){ return false; } </text>);
columns.Bound(col => col.Hold).Width(50).ClientTemplate("<input type='checkbox' #= Hold ? checked='checked':'' # class='chkbx hold' />").Editable(@<text> function(e){ return false; } </text>);
columns.Bound(col => col.AddItem).Width(50).ClientTemplate("<input type='checkbox' #= AddItem ? checked='checked':'' # class='chkbx additem' />").Editable(@<text> function(e){ return false; } </text>);
columns.Bound(col => col.Reports).Width(50).ClientTemplate("<input type='checkbox' #= Reports ? checked='checked':'' # class='chkbx reports' />").Editable(@<text> function(e){ return false; } </text>);
columns.Command(command => { command.Edit(); command.Destroy(); }).Width(160);
})
.NoRecords(c => c.Template("<strong> No data </strong>"))
.Sortable()
.Editable(editable =>
{
editable.Mode(GridEditMode.InLine);
})
.ToolBar(tools =>
{
tools.Search().Text("Search all fields...");
tools.Excel().HtmlAttributes(new { id = "save", @class = "k-button margin-left" });
tools.Create();
})
.Scrollable(c => c.Enabled(true))
.Resizable(resize => resize.Columns(true))
.Reorderable(r => r.Columns(true))
.Height(750)
.HtmlAttributes(new { style = "width:100%;" })
.DataSource(dataSource => dataSource
.WebApi()
.ServerOperation(false)
.Model(model =>
{
model.Id(p => p.PermissionID);
model.Field(p => p.UserID).DefaultValue("JEINC\\");
model.Field(f => f.Initials);
model.Field(f => f.Country);
})
.Events(events => {
events.RequestEnd("GridRequestEnd");
events.Error("error_handler");
})
.Read(read => read.Action("GetGridData", "Admin"))
.Create(create => create.Action("Create", "Admin"))
.Update(update => update.Action("Update", "Admin"))
.Destroy(destroy => destroy.Action("Delete", "Admin", new { Id = "{0}" }))
)
)
The model:
public class AccessControlsModel
{
public int PermissionID { get; set; }
[Required]
public string UserID { get; set; }
public string Initials { get; set; }
[UIHint("CountriesDDL")]
public string Country { get; set; }
public bool Admin { get; set; }
public bool PendingStatus { get; set; }
public bool BOM { get; set; }
public bool ProcessSheet { get; set; }
public bool Matrix { get; set; }
public bool Quality { get; set; }
public bool Process { get; set; }
public bool Release { get; set; }
public bool Hold { get; set; }
public bool AddItem { get; set; }
public bool Reports { get; set; }
}
The error (immediately on load of the grid)
Thanks in advance!
Tyler

Hi,
I am struggling to use core UI wizard with respect to my requirement. What I need from wizard control is to provide navigation (Next, Previous), load partial views and submit data to a form. Following is an example;
<form>
Step 1
Partial View 1
Step 2
Partial View 2
Finish (Form submission)

Hi,
I'm using a Donut Chart and would like to specify the Color via expression like the expressionValue and categoryExpression like so:
series
.Donut(model => model.Count, model => model.Status, model => model.Color)I've looked via source code and can see that the ChartSeries class does have a Color filed but with no way of specifying it.
Can you please recommend a fix/solution?
PS I am using remote data source.
Hello all,
Following the guidelines https://docs.telerik.com/kendo-ui/knowledge-base/fixed-headers-grid, I managed to create a stuck headers grid.
Nevertheless, I have the following two open points that are related with this.
Best regards,
Sotiris
Our customers like to take data from the grid, and put it in editors like notepad, excel, word or others...
Is there a way to copy the visible, or, all, the grid data to clipboard, as tab separated values? as in the attached picture
I have a Core grid that manages the Sol objects.
<div class="col-sm-12"> @(Html.Kendo().Grid(Model) .Name("mySolsGrid") .Columns(columns => { columns.Bound(c => c.Nom).Width(140); columns.Bound(c => c.Code).Width(190); columns.Command(command => { command.Edit(); command.Destroy(); }).Width(172); }) .ToolBar( toolbar => { toolbar.Create(); toolbar.Excel(); } ) .Editable(editable => editable.Mode(GridEditMode.InLine)) .Pageable() .Sortable() .Scrollable(scr=>scr.Height(430)) .Filterable() .DataSource(dataSource => dataSource .Ajax() .PageSize(20) .Events(events => events.Error("error_handler")) .Model(model => model.Id(p => p.Id)) .Create(update => update.Action("Sols_Create", "Sols")) .Read(read => read.Action("Sols_Read", "Sols")) .Update(update => update.Action("Sols_Update", "Sols")) .Destroy(update => update.Action("Sols_Destroy", "Sols")) ) )</div>This is my controller:
[AcceptVerbs("Post")]public async Task<ActionResult> Sols_CreateAsync([DataSourceRequest] DataSourceRequest request, SolDTO solDto){ SolDTO idOnly = solDto; if (solDto != null && ModelState.IsValid) { idOnly = await _solService.CreateAsync(solDto); } return Json(new[] { idOnly }.ToDataSourceResult(request, ModelState));}this is my Service returning object:
public async Task<SolDTO> CreateAsync(SolDTO solDto){ var sol = _mapper.Map<Sol>(solDto); await _userService.SetCreatedByCurrentUserNowAsync(sol); sol = await _repository.AddAsync(sol); var dto = _mapper.Map<SolDTO>(sol); return dto;}I return here the ID that is not 0. However each time I add a new object (i click on update button) it calls the Create function one more time. First call once, second twice etc.
Does the Async method have something to do with that?
what is that
source = Regex.Replace(source, @"\$\(document\)\.on\(""kendoReady"",", "$(document).ready(", RegexOptions.Multiline);
in the ASP.NET Core Examples code?
Should I understand that all the document.on('kendoReady' in fact should not be used, and instead "document.Ready" should be used ?
How a developer that usually copies only parts of examples should guess that hack?
