In our UI for ASP.NET Core R3 2020 (2020.3.915) release, the Column menu message of unsticking a column is "null".
This bug will be resolved in our next official release.
In the meantime, as a workaround, manually set the Unstick Column menu message:
.ColumnMenu(c => c.Messages(m => m.Unstick("Unstick Column")))Good afternoon,
Using the demo https://demos.telerik.com/aspnet-core/grid/custom-command edited in REPL I have added some extra columns and grouping, plus a custom command whose visibility is conditional.
When I make the grid scrollable and contained in a div whose class is "container" the custom command column is hidden at runtime.
Index.html:
<div class="container">
@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.EmployeeViewModel>()
.Name("Grid")
.Columns(columns => {
columns.Command(command => command.Custom("Close").Click("showDetails").Visible("colVisible"));
columns.Bound(e => e.Title);
columns.Group(group => group
.Title("Name")
.Columns(name => {
name.Bound(e => e.FirstName).Width(80);
name.Bound(e => e.LastName).Width(80);
})
);
columns.Bound(e => e.FirstName).Width(80);
columns.Bound(e => e.LastName).Width(80);
columns.Bound(e => e.Title).Width(250);
columns.Bound(e => e.FirstName).Width(80);
columns.Bound(e => e.LastName).Width(80);
columns.Bound(e => e.Title).Width(250);
})
.Size(ComponentSize.Small)
.Scrollable()
.Sortable()
.Resizable(resize => resize.Columns(true))
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("CustomCommand_Read", "Grid"))
)
)
</div>
@(Html.Kendo().Window().Name("Details")
.Title("Customer Details")
.Visible(false)
.Modal(true)
.Draggable(true)
.Width(300)
)
<script type="text/x-kendo-template" id="template">
<div id="details-container">
<h2>#= FirstName # #= LastName #</h2>
<em>#= Title #</em>
<dl>
<dt>City: #= City #</dt>
<dt>Address: #= Address #</dt>
</dl>
</div>
</script>Script.js:
function showDetails(e) {
e.preventDefault();
var detailsTemplate = kendo.template($("#template").html());
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
var wnd = $("#Details").data("kendoWindow");
wnd.content(detailsTemplate(dataItem));
wnd.center().open();
}
function colVisible(dataItem) {
var visible = dataItem.LastName == "Fuller";
return !visible;
}Is there a way to make the custom command appear? I guess that the width of the grid is being set by "container", I've predefined column widths of some of the columns, and it works out which columns appear before the visibility of the custom command is decided, so that appears behind the first Title column?
Kind regards,
Richard

I have a grid where I am using a custom grouping javascript event becuase one of the columns is using an editor template, when they group by that column, I want them to actually group by the hidden column containing the data for the column, not the ID.
When I drag the item to group it, the category name displays fine, having run through my javascript function.
But when I click the three dots and use the column menu, and select Group, it uses the ID instead, and you can see that is what it is grouped by in the header.
I suppose I could get around this by setting a custom group header for it? I'm just not sure why it's by passing my javascript.

In this example
https://demos.telerik.com/aspnet-core/grid/ai-toolbar
It references
.Service("https://demos.telerik.com/service/v2/ai/grid/smart-state")
However no code example or details of how to implement this
Where do I find the code or documentation of how to implement
I feel like this should be simple but I can't figure this out. I use the [Display(Name = "Code")] annotation in my view model. I have a simple custom editor popup on my grid. I use taghelpers because I just do. I am trying to get my labels to show the display name in my popup. I have seen older posts where validation is also not working but I think this has been fixed. Either way I feel like this should work.
Model
public class ChargeViewModel
{
[ScaffoldColumn(false)]
public int ChargesID { get; set; }
[Required]
[UIHint("EditChargePopup")]
[Display(Name = "Code")]
public string ChargesCodeID { get; set; }
Custom Editor
<div class="col-4">
<label for="ChargesCodeID" />
<kendo-textbox for="ChargesCodeID" />
</div>
<div class="col-4">
<label for="Charges_Name" />
<kendo-textbox for="Charges_Name" />
</div>
<div class="col-4">
<label for="Charges_Fee" />
<kendo-numerictextbox for="Charges_Fee" format="c2" decimals="2" />
</div>
Results

I have created a fresh project with the following variables:
I am trying to create a simple grid as following that has an editable `DateTime?` column:
https://netcorerepl.telerik.com/GpFmvpEr29UDYPJN54
It works in the REPL link above, but if I press "Edit" on my local project, the DateTime column defaults to a text input without the datetimepicker buttons (see Attachment-1.png), I'm not sure what I am missing.
I've checked that `/Views/Shared/Editor/Templates/DateTime.cshtml` exists and the content is as follows:
@model DateTime?
@(Html.Kendo().DateTimePickerFor(m => m).HtmlAttributes(new { title = Html.ViewContext.ViewData.TemplateInfo.GetFullHtmlFieldName("")}))I've placed either `[DataType("Date")]` or `[DataType("DateTime")]` annotation on the class property definition and neither worked.
I've used `.EditorTemplateName("DateTime")` and/or `[UIHint("DateTime")]` and it didn't work.
I've created a new Template type and it didn't work.
I'm not sure what else to try to make it work.
I am converting a MVC table grid to a Telerik Grid. While looking at it, there are conditional columns. For example:
@if (Model?.GroupDetail?.IsMec == false)
{
<th class="text-secondary" style="width: 140px;">Group Info</th>
}
<th class="text-secondary">
@if (Model?.GroupDetail?.IsMec == false)
{
<text>Office</text>
}
else
{
<text>Role</text>
}
</th>I am trying to put an "action" menu on the toolbar of my grid. I have used a dropdownlist as is shown on your examples. The issue that I have with this is that action menus have a placeholder because all of the menu items have equal importance so no one menu item is the default. So I have rigged up menu like events with my javascript but it is still not ideal since the "placeholder" is a selectable list item. So then I had the brilliant idea of using telerik's menu within my custom client template. Easy peasy. Right? No, the dropdown or the .k-animation-container .k-animation-container-shown's z-order is 10002 and no matter how hard I try I can't get it to change and the dropdown is hidden by the grid header.
I was left to wonder if it is because it is limited to the confines of the toolbar. I am open to suggestions. I would hate to have to go back to the clunky dropdownlist option. Here's my code:
<style>I have a grid that only has a Delete button defined. The user can add a new record inline. How can I show the Save and Cancel buttons instead of the Delete button. They should not have an Edit button option.
Here is my code snippet:
@(
Html.Kendo().Grid<CommunityAssociationMasterModel>()
.Name("CommunityAssociationMasterList")
.Columns(columns =>
{
columns.Bound(p => p.DistrictCode).Title("District").Width(70);
columns.Bound(p => p.IndexNumber).Title("Index").Width(100);
columns.Bound(p => p.CreditName).Title("Credit");
columns.Command(command => { command.Destroy(); }).Width(210);
})
.ToolBar(toolbar => { toolbar.Create().Text("Add Credit Account"); toolbar.Excel(); })
.Sortable()
.Scrollable()
.Pageable()
.HtmlAttributes(new { style = "height:650px;" })
.Events(events => events.Change("onChange"))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(10)
.Events(events => events.Error("error_handler"))
.ServerOperation(false)
.Model(model =>
{
model.Id(p => p.MasterCreditId);
model.Field(p => p.DistrictCode);
model.Field(p => p.IndexNumber);
model.Field(p => p.CreditName).DefaultValue("Community Assoc Credit").Editable(false);
})
.Read(read => read.Action("CommunityAssociation_Read", "CommunityAssociation"))
.Create(create => create.Action("CommunityAssociation_Create", "CommunityAssociation"))
.Destroy(read => read.Action("CommunityAssociation_Delete", "CommunityAssociation"))
)
I'm sure this is easy but I'm just not finding it.
