<div class="col-9"> @(Html.Kendo().TabStrip() .Name("TabWorkflow") .Animation(false) .SelectedIndex(0) .Items(tab => { tab.Add().Text("Statuses").Enabled(Model.WorkflowId != 0).LoadContentFrom("Index", "WorkflowStatus", new { workflowId = Model.WorkflowId }); }) ) </div>
I have a grid in where I added edit button that is connected to a custom template. When I click the button to edit fields for this row. It does not pop up my custom template but the default one with all the data. this is what I have:
@(
Html.Kendo().Grid(Model.GroupMemberships)
.Name("MemberGroupsGrid")
.Columns(columns =>
{
columns.Template(
"# if (CanEdit) { #" +
"<a href='javascript:void(0)' name='expireDeleteLink' class='full-link w-100 h-100 d-flex align-items-center justify-content-center' " +
"title='Expire or Delete Member' " +
"onclick='openExpireDeleteModal(\"#= Id #\", \"#=GroupName#\", \"#=Name#\", \"#=IsExpired#\", \"" + Model.UserCanDeleteString + "\")'> " +
"<i class='fa-regular fa-trash-can text-danger' aria-hidden='true'></i>" +
"</a>" +
"# } #"
)
.Width(100)
.HtmlAttributes(new { @class = "text-center p-0 align-middle" })
.Media("(min-width: 850px)");
columns.Command(command => command.Edit().Text(" ").IconClass(" fa-solid fa-user-pen text-secondary").HtmlAttributes(new { title = "Edit Member" }).Visible("CanEdit"));
columns.Bound(m => m.GroupId).Title("Group ID").Hidden(true).Exportable(false);
columns.Template("#=resColTemplate(data)#").Media("(max-width: 849px)");
})
.Pageable()
.Editable(e => e.Mode(GridEditMode.PopUp).TemplateName("GroupMemberDetailTemplate").Window(w => w.Title("Member Group Details").Width(400).Height(300)))
.Sortable()
.Excel(excel => excel
.FileName("GroupMemberships.xlsx")
.Filterable(true)
.AllPages(true))
.AutoBind(true)
@* .Editable(e => e.Mode(GridEditMode.PopUp).TemplateName("MemberGroup")) *@
.Events(ev => ev.Change("onChange").DataBound("onDataBound"))
.HtmlAttributes(new { @class = "table table-hover align-middle" })
.DataSource(dataSource => dataSource
.Ajax()
.ServerOperation(false)
.Read(read => read.Action("GetGroupMemberships", "Members").Data("additionalData"))
.PageSize(10)
)
)this is the template
@model AMPS.Web.Models.MemberGroupsManagementPageModel.GroupMemberships
@{
}
<div class="row">
<div class="col-md-6">
@(Html.DisplayFor(model => model.MemberName)))
</div>
</div>
I'm attempting to use the Kendo Upload control asynchronously to an MVC controller, which passes the file to a WebApi controller. The file is uploaded successfully, however when it returns to the MVC view, it reports that the file failed to upload with the error below. We are using Azure B2C for authentication:
"Access to XMLHttpRequest at 'https... b2clogin.com...' (redirected from 'https//localhost:7074/Files/UploadFile') from origin 'https://localhost:7074' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource."
Server response:
"Failed to load resource: net::ERR_FAILED"
The control is located in a partial view as part of a tab control on a CSHTML view. Here is the code for the upload control:
<div class="row">
<div class="col-md-8">
@(Html.Kendo().Upload()
.Name("uploadedFile")
.Multiple(false)
.Validation(v =>
{
v.AllowedExtensions(new string[] { ".csv" });
v.MaxFileSize(3145728);
})
.Async(a => a
.AutoUpload(false)
.Save("UploadFile", "Files")
)
.Events(e =>
{
e.Upload("onFileUpload");
})
)
</div>
<div class="col-md-4">
</div>
</div>
Here is the C# code for the MVC controller:
[HttpPost]
public async Task<ActionResult> UploadFile(IFormFile uploadedFile, string month, string year)
{
if (uploadedFile == null || uploadedFile.Length == 0)
return BadRequest("No file uploaded.");
var reportingPeriod = month + year;
using (var content = new MultipartFormDataContent())
{
if (uploadedFile.Length > 0)
{
var streamContent = new StreamContent(uploadedFile.OpenReadStream());
streamContent.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue(uploadedFile.ContentType);
content.Add(streamContent, "file", uploadedFile.FileName);
}
using (var response = await _client.HttpClient.PostAsync("/api/Files/loadbackdatedmonthlytrueupfile/" + reportingPeriod, content))
{
if (response.IsSuccessStatusCode)
{
// Kendo expects an empty string for success
return Content("");
}
else
{
return StatusCode((int)response.StatusCode, await response.Content.ReadAsStringAsync());
}
}
}
}
Here is the code for the WebApi controller:
[HttpPost("loadbackdatedmonthlytrueupfile/{reportingPeriod}")]{
//other logic here
return Ok(new { file.FileName, file.Length });
}
This is the info I received from Copilot:
How can I configure this upload control to return to the view without the error (attaching screenshot)?
I currently have a Grid that I want the ClientDetailTemplateId to be the editable area for fields that are currently not displayed on the grid. Then have an update button that uses the Datasource function of Update to update that row's values.
@( Html.Kendo().Grid(Model.Members)
.Name("membersGrid")
.Columns(columns =>
{
})
.AutoBind(true)
.HtmlAttributes(new { @class = "table table-hover align-middle faux-k-table" , style =" width: 100%"})
.Pageable()
.Sortable(false)
.ClientDetailTemplateId("DetailGridTemplate")
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(50)
.Events(e => e.RequestStart("onRequestStart")
.RequestEnd("onRequestEnd")
)
.Read(read => read.Action("GetGroupMembers", "Members").Data("additionalData"))
).NoRecords(n => n.Template(@"<div class=""alert alert-warning"">
No data found with selected filter values or there are no eligible members from your MEC to view.
</div>"))
)
script id="DetailGridTemplate" type="text/kendo-tmpl">
</script>
<head>
<link rel="stylesheet" href="~/css/my-theme.v0.1.0.css" asp-append-version="true" />
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<script src="https://cdn.kendostatic.com/2026.1.415/js/kendo.all.min.js"></script>
<script src="https://cdn.kendostatic.com/2026.1.415/js/kendo.aspnetmvc.min.js"></script>
</head>
<body class="k-body k-bg-surface">
<header>
<kendo-appbar name="appBar">
<items>
<appbar-item type="AppBarItemType.ContentItem"
template="<a class='k-button k-button-flat' href='/Index'>Index</a>">
</appbar-item>
</items>
</kendo-appbar>
</header>
</body>


Does anyone know if there are any plans for custom cell editing (e.g., https://demos.telerik.com/aspnet-core/spreadsheet/custom-editors) and filtering (e.g., https://demos.telerik.com/aspnet-core/grid/filter-row) to be keyboard accessible?

