I have an autocomplete and a grid where my intention is to push records from Autocomplete into the grid and save those records using grid's create action from there by invoking a method set in a custom button. Please look at the attached picture to get a clear idea of what my setup looks like.
My saveTerminalRow function doesn't work as expected. Please help.
<div> @(Html.Kendo().AutoComplete() .Name("terminalsAutoComplete") .DataTextField("cmp_name") // omitted for brevity .Events(e => e.Select("onTerminalNameSelect")) )</div><div> @(Html.Kendo() .Grid<ProjectName.TerminalOutOfState>() .Name("manageTOSSqlRecordsGrid") .Columns(columns => { columns.Bound(c => c.TerminalOutOfStateID).Hidden(); columns.Bound(c => c.TerminalCompanyID).Title("Terminal ID").Width(60); columns.Bound(c => c.CompanyID).Title("Region").ClientTemplate("#=CompanyName#").Width(40); columns.Command(cmd => { cmd.Edit(); cmd.Destroy(); cmd.Custom("Save").Visible("showSaveCommand").Click("saveTerminalRow"); }).Title("Action").Width(80); }) .ToolBar(tbr => { tbr.Create(); tbr.Custom().Text("Load the table"); }) .Editable(edt => edt.Mode(GridEditMode.PopUp).TemplateName("TOoSTemplate").CreateAt(GridInsertRowPosition.Top)) .DataSource(dataSrc => dataSrc .Ajax() .ServerOperation(true) .PageSize(15) .Model(mdl => mdl.Id(column => column.TerminalOutOfStateID)) .Create(update => update.Action("UpsertTerminalOoSRecordAsync", "Configuration")) //omitted for brevity ) .AutoBind(false) )</div>
My scripts are like follows:
<script> //This will add the data from autocomplete into the grid. function onTerminalNameSelect(e) { var dataItem = this.dataItem(e.item); var terminalData = { TerminalOutOfStateID: 0, TerminalCompanyID: dataItem.cmp_id, CompanyID: dataItem.region_id, CompanyName: dataItem.region_name }; var grid = $("#manageTOSSqlRecordsGrid").data("kendoGrid"); grid.dataSource.add(terminalData); } //This is used to hide and show "Save" button to those rows that are not yet saved to Db. function showSaveCommand(dataItem) { // show the Save button for the item with TerminalOutOfStateID =0 if (dataItem.TerminalOutOfStateID == 0) { return true; } else { return false; } } //This is the method to save the inserted row into Db by calling the create action method. But this doesn't work: function saveTerminalRow(e) { var terminalData = this.dataItem($(e.currentTarget).closest("tr")); var grid = $("#manageTOSSqlRecordsGrid").data("kendoGrid"); grid.saveRow(); }</script>
These are the screenshots.
I'm getting a message
Extension 'Telerik UserSettings VSExtension 2.1' likely cuased 9 seconds of unresponsiveness. Disabling it may improve your experience.
According to https://social.msdn.microsoft.com/Forums/sqlserver/en-US/9fe58a7b-07bd-4efe-b1a5-8dc3bb33ee79/extension-microsoft-integration-services-projects-13-likely-caused-11-seconds-of-unresponsiveness?forum=ssdt, this is due to 15.6.0 of VS2017 displaying this message for extensions that are not loaded async.
Two Things:
1. Can you update the extension to make it load async?
2. Can I disable it without impacting my work?
Thanks!
Laurie
I want to resize the size of Upload File icon, but not work even I change it to attachment icon, still have space around the icon. Can any one teach me how to do it. Thanks.
thank you very much!!!

I have a grid that looks like this:
@(Html.Kendo().Grid<ProjectName.TerminalOutOfState>().Name("manageTOSSqlRecordsGrid").Columns(columns =>{ columns.Bound(c => c.TerminalOutOfStateID).Hidden(); columns.Bound(c => c.TerminalCompanyID).Title("Terminal ID").Width(60); columns.Bound(c => c.CompanyID).Title("Region").ClientTemplate("#=CompanyName#").Width(40); columns.Command(cmd => { cmd.Edit(); cmd.Destroy(); cmd.Custom("Save").Visible("showSaveCommand").Click("saveTerminalRow"); }).Title("Action").Width(80);}).ToolBar(tbr =>{ tbr.Create(); tbr.Custom().Text("Load the table");}).Editable(edt => edt.Mode(GridEditMode.PopUp).TemplateName("TOoSTemplate").CreateAt(GridInsertRowPosition.Top)).DataSource(dataSrc => dataSrc .Ajax() .ServerOperation(true) .PageSize(15) .Model(mdl => mdl.Id(column => column.TerminalOutOfStateID)) .Create(update => update.Action("UpsertTerminalOoSRecordAsync", "Configuration")) //omitted for brevity).AutoBind(false))
My focus here is on the Region column. The kind of data it gets looks like this:
CompanyID: 1
Instead of showing just 1, I pass the Name for that Id on a variable called CompanyName and show it using ClientTemplate.
It all works and looks good until I either edit the row or add a new row and it shows null.
After I reload the table, then it shows the correct value.
Please look at my attached screenshots to get a better picture.
I have a portal and an IdentityServer4 site for authentication. When I load a page my Telerik Grid goes out to get the data. My scenario is, if I let the page sit long enough to let the Token expire I expect the UI to redirect for login... but that doesn't happen. The grid works fine when I have a valid Access Token. I need this to redirect and be happy. Instead, the grid returns no feedback and I get the following:
Request (I removed the cookie gook):
Invoke-WebRequest -Uri "https://localhost:44355/Customers/IndexJson" `
-Method "POST" `
-Headers @{
"method"="POST"
"authority"="localhost:44355"
"scheme"="https"
"path"="/Customers/IndexJson"
"sec-ch-ua"="`"Google Chrome`";v=`"87`", `" Not;A Brand`";v=`"99`", `"Chromium`";v=`"87`""
"accept"="*/*"
"x-requested-with"="XMLHttpRequest"
"sec-ch-ua-mobile"="?0"
"user-agent"="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36"
"origin"="https://localhost:44355"
"sec-fetch-site"="same-origin"
"sec-fetch-mode"="cors"
"sec-fetch-dest"="empty"
"referer"="https://localhost:44355/Customers"
"accept-encoding"="gzip, deflate, br"
"accept-language"="en-US,en;q=0.9"
-ContentType "application/x-www-form-urlencoded; charset=UTF-8" `
-Body "sort=&page=1&pageSize=20&group=&filter=&dateRangeIndex=3&isActiveIndex=0";
Invoke-WebRequest -Uri "https://localhost:5001/connect/authorize?client_id=GsiPortal.App&redirect_uri=https%3A%2F%2Flocalhost%3A44355%2Fsignin-oidc&response_type=code&scope=openid%20profile%20offline_access%20email%20phone%20address%20roles%20IdentityServerApi%20Gsi.Activity.Api%20Gsi.Azure.Blob.Api%20Gsi.Azure.Comm.Api%20Gsi.Customer.Api%20Gsi.Cloud.Maintenance.Api&response_mode=form_post&nonce=...cleaned...-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.7.1.0" -Headers @{
"Referer"="https://localhost:44355/"
"User-Agent"="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36"
};
Invoke-WebRequest -Uri "https://localhost:5001/connect/authorize?client_id=GsiPortal.App&redirect_uri=https%3A%2F%2Flocalhost%3A44355%2Fsignin-oidc&response_type=code&scope=openid%20profile%20offline_access%20email%20phone%20address%20roles%20IdentityServerApi%20Gsi.Activity.Api%20Gsi.Azure.Blob.Api%20Gsi.Azure.Comm.Api%20Gsi.Customer.Api%20Gsi.Cloud.Maintenance.Api&response_mode=form_post&nonce=...cleaned...-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.7.1.0" `
-Method "OPTIONS" `
-Headers @{
"method"="OPTIONS"
"authority"="localhost:5001"
"scheme"="https"
"path"="/connect/authorize?client_id=GsiPortal.App&redirect_uri=https%3A%2F%2Flocalhost%3A44355%2Fsignin-oidc&response_type=code&scope=openid%20profile%20offline_access%20email%20phone%20address%20roles%20IdentityServerApi%20Gsi.Activity.Api%20Gsi.Azure.Blob.Api%20Gsi.Azure.Comm.Api%20Gsi.Customer.Api%20Gsi.Cloud.Maintenance.Api&response_mode=form_post&nonce=...cleaned...-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.7.1.0"
"accept"="*/*"
"access-control-request-method"="GET"
"access-control-request-headers"="x-requested-with"
"origin"="https://localhost:44355"
"user-agent"="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36"
"sec-fetch-mode"="cors"
"sec-fetch-site"="same-site"
"sec-fetch-dest"="empty"
"referer"="https://localhost:44355/"
"accept-encoding"="gzip, deflate, br"
"accept-language"="en-US,en;q=0.9"
};
Invoke-WebRequest -Uri "https://localhost:44355/Customers/IndexJson" `
-Method "POST" `
-Headers @{
"method"="POST"
"authority"="localhost:44355"
"scheme"="https"
"path"="/Customers/IndexJson"
"sec-ch-ua"="`"Google Chrome`";v=`"87`", `" Not;A Brand`";v=`"99`", `"Chromium`";v=`"87`""
"accept"="*/*"
"x-requested-with"="XMLHttpRequest"
"sec-ch-ua-mobile"="?0"
"user-agent"="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36"
"origin"="https://localhost:44355"
"sec-fetch-site"="same-origin"
"sec-fetch-mode"="cors"
"sec-fetch-dest"="empty"
"referer"="https://localhost:44355/Customers"
"accept-encoding"="gzip, deflate, br"
"accept-language"="en-US,en;q=0.9"
} `
-ContentType "application/x-www-form-urlencoded; charset=UTF-8" `
-Body "sort=&page=1&pageSize=20&group=&filter=&dateRangeIndex=3&isActiveIndex=0";
Invoke-WebRequest -Uri "https://localhost:5001/connect/authorize?client_id=GsiPortal.App&redirect_uri=https%3A%2F%2Flocalhost%3A44355%2Fsignin-oidc&response_type=code&scope=openid%20profile%20offline_access%20email%20phone%20address%20roles%20IdentityServerApi%20Gsi.Activity.Api%20Gsi.Azure.Blob.Api%20Gsi.Azure.Comm.Api%20Gsi.Customer.Api%20Gsi.Cloud.Maintenance.Api&response_mode=form_post&nonce=...cleaned...-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.7.1.0" -Headers @{
"Referer"="https://localhost:44355/"
"User-Agent"="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36"
};
Invoke-WebRequest -Uri "https://localhost:5001/connect/authorize?client_id=GsiPortal.App&redirect_uri=https%3A%2F%2Flocalhost%3A44355%2Fsignin-oidc&response_type=code&scope=openid%20profile%20offline_access%20email%20phone%20address%20roles%20IdentityServerApi%20Gsi.Activity.Api%20Gsi.Azure.Blob.Api%20Gsi.Azure.Comm.Api%20Gsi.Customer.Api%20Gsi.Cloud.Maintenance.Api&response_mode=form_post&nonce=...cleaned...-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.7.1.0" `
-Method "OPTIONS" `
-Headers @{
"method"="OPTIONS"
"authority"="localhost:5001"
"scheme"="https"
"path"="/connect/authorize?client_id=GsiPortal.App&redirect_uri=https%3A%2F%2Flocalhost%3A44355%2Fsignin-oidc&response_type=code&scope=openid%20profile%20offline_access%20email%20phone%20address%20roles%20IdentityServerApi%20Gsi.Activity.Api%20Gsi.Azure.Blob.Api%20Gsi.Azure.Comm.Api%20Gsi.Customer.Api%20Gsi.Cloud.Maintenance.Api&response_mode=form_post&nonce=...cleaned...-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.7.1.0"
"accept"="*/*"
"access-control-request-method"="GET"
"access-control-request-headers"="x-requested-with"
"origin"="https://localhost:44355"
"user-agent"="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36"
"sec-fetch-mode"="cors"
"sec-fetch-site"="same-site"
"sec-fetch-dest"="empty"
"referer"="https://localhost:44355/"
"accept-encoding"="gzip, deflate, br"
"accept-language"="en-US,en;q=0.9"
}
Errors:
Customers#:1 Access to XMLHttpRequest at 'https://localhost:5001/connect/authorize?client_id=GsiPortal.App&redirect_uri=https%3A%2F%2Flocalhost%3A44355%2Fsignin-oidc&response_type=code&scope=openid%20profile%20offline_access%20email%20phone%20address%20roles%20IdentityServerApi%20Gsi.Activity.Api%20Gsi.Azure.Blob.Api%20Gsi.Azure.Comm.Api%20Gsi.Customer.Api%20Gsi.Cloud.Maintenance.Api&response_mode=form_post&nonce=637462512968208243.ZTllMzdmOGEtMzRlZS00YWZmLWExMGItNTI0NGEwMmNlYmE2MTQ5ZTIyZmMtMWQ4Yi00YWU3LTk2NTMtYTY2N2FjMzViNDkz&state=CfDJ8D424Yro--hNo8czS4g4Tz-M0hUZ8IWLi1m4T_Vf02s_0tj9j1HSSNWueJYBxRBUEaKtzsY2P5UDGqi81fSr7doRchzSEur_bDMgPj7KwjTD70DlRUhBCalBV3sz08X793e8JQTKwAp_Psp7VOeoM-XGKIpFW-flsS0Z1sHwIUusvFhkXQdvGNfWMlJ4xHMzweHEUNFqTxPkevdBetlRNnCcUExXZYArJDr2IcewGDAS0toh7L2TUWZQ3DT56aXG_18aLwRHSuNXuRzEE1c8GJMgj97cYy5mfW4QRNW9oGBFPe41dhASstz4VaVyinNEPw&x-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.7.1.0' (redirected from 'https://localhost:44355/Customers/IndexJson') from origin 'https://localhost:44355' 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.
jquery.min.js:4 GET https://localhost:5001/connect/authorize?client_id=GsiPortal.App&redirect_uri=https%3A%2F%2Flocalhost%3A44355%2Fsignin-oidc&response_type=code&scope=openid%20profile%20offline_access%20email%20phone%20address%20roles%20IdentityServerApi%20Gsi.Activity.Api%20Gsi.Azure.Blob.Api%20Gsi.Azure.Comm.Api%20Gsi.Customer.Api%20Gsi.Cloud.Maintenance.Api&response_mode=form_post&nonce=637462512968208243.ZTllMzdmOGEtMzRlZS00YWZmLWExMGItNTI0NGEwMmNlYmE2MTQ5ZTIyZmMtMWQ4Yi00YWU3LTk2NTMtYTY2N2FjMzViNDkz&state=CfDJ8D424Yro--hNo8czS4g4Tz-M0hUZ8IWLi1m4T_Vf02s_0tj9j1HSSNWueJYBxRBUEaKtzsY2P5UDGqi81fSr7doRchzSEur_bDMgPj7KwjTD70DlRUhBCalBV3sz08X793e8JQTKwAp_Psp7VOeoM-XGKIpFW-flsS0Z1sHwIUusvFhkXQdvGNfWMlJ4xHMzweHEUNFqTxPkevdBetlRNnCcUExXZYArJDr2IcewGDAS0toh7L2TUWZQ3DT56aXG_18aLwRHSuNXuRzEE1c8GJMgj97cYy5mfW4QRNW9oGBFPe41dhASstz4VaVyinNEPw&x-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.7.1.0 net::ERR_FAILED
send @ jquery.min.js:4
ajax @ jquery.min.js:4
read @ kendo.all.js:6404
read @ kendo.aspnetmvc.js:257
(anonymous) @ kendo.all.js:7524
_queueRequest @ kendo.all.js:7790
read @ kendo.all.js:7517
gridRefresh @ Customers:214
onclick @ Customers:171
Grid:
@(Html.Kendo().Grid<Customer>()
.Name("grid")
.Columns(columns =>
{
columns.Command(command => command
.Custom("Select")
.Click("goDetail"))
.Width(Glossary.Portal.ButtonWidth);
columns.Bound(p => p.Name)
.Filterable(ftb => ftb.Cell(cell => cell.Operator("contains")
.ShowOperators(false)
.SuggestionOperator(FilterType.Contains)));
columns.Bound(p => p.LicenseRenewalTimestamp).Title("License Renewal");
})
.Pageable()
.Sortable()
.Scrollable()
.Filterable(ftb => ftb.Mode(GridFilterMode.Row))
.HtmlAttributes(new {style = "height:596px;"})
.Selectable()
.Navigatable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("IndexJson", "Customers")
.Data("gridGetData"))))
Script:
function gridRefresh() {
var grid = $("#grid").getKendoGrid();
grid.dataSource.read();
}
function gridGetData() {
var isActiveIndex = $("#isActiveOptions").val();
//alert("isActiveIndex: " + isActiveIndex);
var dateRangeIndex = $("#dateRangeOptions").val();
//alert("dateRangeIndex: " + dateRangeIndex);
return {
dateRangeIndex: dateRangeIndex,
isActiveIndex: isActiveIndex
};
return null;
}

I've sorted out how to use the custom editor template but what I'd like to do is to replace the entire dialog with one that matches the look of the rest of our application. Using the template I can replace individual controls but the header/window/button look and feel is different that what we'd like. I know I can style them but the layout is a little different and I'd like more control.
Can I intercept and block the editor loading and load my own dialog? Or is there another means that I can replace the edit process with my own view?
Thanks,
Brian

Is there a way to change the width of the control. I've try htmlattribute with a class that include the width nothing is changing.
Any clue ?
Best regards

Hi,
I have the following code to create a form, but when I submit it, I get a 400.
@(Html.Kendo().Form<ConfigurationModel>() .Name("formExample") .HtmlAttributes(new { url = @Url.Action("ProductQuantity", "Reports"), method = "POST" }) .Items(items => { items.Add() .Field(f => f.SchoolProductQuantityReportSchoolId) .Label(l => l.Text("School:")) .Hint("Select a school") .Editor(b => b.ComboBox() .DataTextField("Description") .DataValueField("Id") .DataSource(dataSource => dataSource .ServerFiltering(true) .Read(read => read.Action(actionName, "School") .Data("addAntiForgeryToken"))) ); })My goal here is to not use Ajax, I want a full post back the old-fashioned way.
Thanks for your help.
ASP MVC Core grid with the search box enabled. Per the docs I turned server operation to 'false' and from what I have read this should then allow searching for more that just string types. In the below example 'PaymentType' is an enum and the search box does not work when searching for that. It also does not work for the formatted date.
I could change the datatypes to string but then it might break ordering columns that are DateTime types.
@(Html.Kendo().Grid<B3.Services.LoanServices.LoanServiceModels.PaymentServiceModel>()
.Name("PaymentRegisterReport")
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("Payments_Read", "StandardReports", new { area = "Reports" }))
.PageSize(1000)
.ServerOperation(false)
)
.Columns(columns =>
{
columns.Bound(p => p.Date).Format("{0:MM/dd/yyyy}").Title("Date");
columns.Bound(p => p.LoanName).Title("Loan Name");
columns.Bound(p => p.PaymentType).Title("Payment Type");
columns.Bound(p => p.CheckNumber).Title("Check Number");
columns.Bound(p => p.Amount).Title("Amount").Format("{0:C}")
.HtmlAttributes(new { style = "text-align: right" }).HeaderHtmlAttributes(new { style = "text-align: right" });
})
.Pageable()
.Sortable()
.Filterable()
.HtmlAttributes(new { style = "font-size:12px" })
.ColumnMenu()
.ToolBar(t =>
{
t.Search();
t.Excel();
})
.Reorderable(l => l.Columns(true))
.Events( e =>
{
e.ColumnShow("saveKendoGridState");
e.ColumnHide("saveKendoGridState");
e.ColumnReorder("kendoGridColumnReorder");
})
)
Hi,
I'm trying to create an ASP.NET Core version 5.0 application using MVC, Telerik UI for ASP.NET Core version 2020.3.1118, and with individual user accounts (ASP.NET Identity) authentication. I need to add scaffolded items to customize the ASP.NET Identity Pages. It seems that this release of the Telerik UI for ASP.NET Core package is incompatible with scaffolded items for ASP.NET Identity Pages. The errors I get depend on which order I do things in.
Scenario 1: First I create the app (with individual user accounts authentication). Next I add the Telerik.UI.for.AspNet.Core version 2020.3.118 package using the manage NuGet packages for solution menu item. Then I attempt to add a new scaffolded item for Identity. VS2019 gives me an error message dialog box that says:
There was an error running the selected code generator: 'Package restore failed. Rolling back package changes for 'WebApplication1'.'
Scenario 2: First I create the app (with individual user accounts authentication). Next I select the context menu item to add new scaffolded item, select Identity, click Add, wait for package changes to happen, and then cancel out of adding a new scaffolded item. Then I attempt to add the Telerik.UI.for.AspNet.Core version 2020.3.118 package using the manage NuGet packages for solution menu item. That fails and I get the following in my error list:
SeverityCodeDescriptionProjectFileLineSuppression State
ErrorNU1107Version conflict detected for Microsoft.CodeAnalysis.CSharp.Workspaces. Install/reference Microsoft.CodeAnalysis.CSharp.Workspaces 3.8.0 directly to project WebApplication1 to resolve this issue.
WebApplication1 -> Microsoft.VisualStudio.Web.CodeGeneration.Design 5.0.1 -> Microsoft.VisualStudio.Web.CodeGenerators.Mvc 5.0.1 -> Microsoft.VisualStudio.Web.CodeGeneration 5.0.1 -> Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore 5.0.1 -> Microsoft.VisualStudio.Web.CodeGeneration.Core 5.0.1 -> Microsoft.VisualStudio.Web.CodeGeneration.Templating 5.0.1 -> Microsoft.VisualStudio.Web.CodeGeneration.Utils 5.0.1 -> Microsoft.CodeAnalysis.CSharp.Workspaces (>= 3.8.0)
WebApplication1 -> Telerik.UI.for.AspNet.Core 2020.3.1118 -> Microsoft.CodeAnalysis 3.3.1 -> Microsoft.CodeAnalysis.CSharp.Workspaces (= 3.3.1).WebApplication1C:\Users\bmorris\source\repos\WebApplication1\WebApplication1\WebApplication1.csproj1
SeverityCodeDescriptionProjectFileLineSuppression State
ErrorPackage restore failed. Rolling back package changes for 'WebApplication1'.
It seems that scaffolded items want to use Microsoft.CodeAnalysis.CSharp.Workspaces version 3.8 and Telerik.UI.for.AspNet.Core wants to use version 3.3.1 and the version are incompatible. Do you have a solution for this now or on the horizon?
Thanks.