How can I get the original values of the row when calling an update function?
My main issue is that we have a few tables where the primary key is a value we allow to be changed. However, the default auto-generated update functions will fail on update if that value is changed in the grid editor because it won't be able to lookup the row you're updating since it only knows what you want to change the value to and tries to look the row up by the new value.
How can we handle this situation?
Hi there - apologies if this is elsewhere, but I've searched and can't find an answer. I have good C# experience, but I'm relatively new to Telerik/Kendo etc,
I am aware of the AllPages(true) option for the Excel printout. What I would like to do on my Grid is to have two excel buttons, one that will export the current page, and one which will export all data.
Is this possible? From what I can see, you can only define one Excel Button on the toolbar.
Thanks in advance.
I'm trying the grouping in Grid I want to display the sum of the column as ClientGroupHeaderColumnTemplate or ClientHeaderTemplate but doesn't seem to be working, it only shows as a ClientFooterTemplate. :
@(Html.Kendo().Grid<Models.DepartmentSummaryView> () .Name("grid") .HtmlAttributes(new { style = " height:700px !important;" }) .Columns(columns => { columns.Bound(p => p.DepartmentNo).Width(150).ClientGroupHeaderTemplate("Department: #= value # (Products: #= count#)"); columns.Bound(p => p.DepartmentName).Width(150).ClientGroupHeaderTemplate("Department: #= value # (Products: #= count#)"); columns.Bound(p => p.ProductNo).Width(150).ClientGroupHeaderTemplate("Product: #= value # (Count: #= count #)"); columns.Bound(p => p.ProductName).Width(150); columns.Bound(p => p.SKU).Width(150); columns.Bound(p => p.Qty).Width(150).ClientGroupHeaderColumnTemplate("Sum: #= sum #").ClientFooterTemplate("Sum: #= sum #"); }) .Filterable(filterable => filterable.Extra(false) //.Mode(GridFilterMode.Row) .Operators(operators => operators .ForString(str => str.Clear() .StartsWith("Starts with") .EndsWith("Ends with") .IsEqualTo("Is equal to") .IsNotEqualTo("Is not equal to") .Contains("Contains") .DoesNotContain("Doesn't contain") ))) //.Pageable() .Navigatable() .AutoBind(false) .Sortable() .Groupable() .Events(events => events.DataBound("onDataBound")) .Reorderable(reorderable => reorderable.Columns(true)) .DataSource(dataSource => dataSource .Custom() .Schema(schema => { schema.Data("Data"); schema.Total("Total"); }) .Events(events => events.Sync("sync_handler")) .Group(groups => groups.Add(p => p.DepartmentNo)) .Aggregates(aggregates => { aggregates.Add(p => p.DepartmentNo).Count(); aggregates.Add(p => p.DepartmentName).Count(); aggregates.Add(p => p.ProductNo).Count(); aggregates.Add(p => p.SKU).Count(); aggregates.Add(p => p.Qty).Sum(); }) .Transport(transport => { transport.Read(read => read.Url("/api/enquiries/departmentsummary) .DataType("json") .Type(HttpVerbs.Get) ); transport.Create(create => create.Url(Base.APIHostAddress + "/api/enquiries/post") .DataType("json") .Type(HttpVerbs.Post) .ContentType("application/json; charset=utf-8") ); transport.ParameterMap("parameterMap"); }) ))
I have got a problem where my grid columns expect a detailed name ("CityFrom" and "CityTo" - those are strings), but a method returns "Name" property. How can I map the result to the columns without duplicating the code?
Here is grid:
@(Html.Kendo().Grid<RouteDto>().Name("route-grid").Columns(cfg =>{ cfg.Bound(m => m.CityFrom) .Title("City From") .Width(150) .Filterable(f => f.Multi(true).DataSource(ds => ds.Read(r => r.Action("GetCities", "City") ) ) ); cfg.Bound(m => m.CityTo) .Title("City To") .Width(150) .Filterable(f => f.Multi(true).DataSource(ds => ds.Read(r => r.Action("GetCities", "City") ) ) );}))
Here is method:
public ActionResult GetCities(){ var cities = _cityService.GetCities().Select(c => new { c.Name }).ToList(); return Json(cities, JsonRequestBehavior.AllowGet);}Error I am getting is in console:
Uncaught ReferenceError: CityFrom is not definedUncaught ReferenceError: CityTo is not defined
On grid I could use .DataTextField("Name"), but I don't have this option here. Both filters have got the same set of values - cities from database. Any ideas what can I do elegantly here?

Hi,
I was wondering if there is a way to accomplish the toolbar functionality in a TreeList as shown for this example in a Grid: Grid / Toolbar template
We need a filtering textbox in the toolbar, that filters the items when the input has changed.
In the pages with Grid's I use buttons with icons from Font Awesome in the Toolbar, in the TreeList I only seem to be able to add buttons via Custom:
.Toolbar(toolbar => { toolbar.Custom().Name("addfieldbutton").Text("Veld toevoegen"); toolbar.Custom().Name("addfolderbutton").Text("Folder toevoegen"); })
It would be nice to keep the design the same when using a TreeList.
Here's my Toolbar for a grid.
.ToolBar(toolbar =>{ toolbar.Template( @<text> @(Html.Kendo().Button() .Name("ButtonAddProperty") .HtmlAttributes(new { type = "k-button" }) .Content("Property toevoegen") .SpriteCssClass("fa fa-plus") .Events(e => e.Click("onCreateProperty")) ) </text>);})
Best regards,
Ronald
Is there any way to disable date by both? Such as to disable it by all Tuesdays and Thursdays in addition to by a list of specific dates recorded in the database?
I see it how to disable date picker by days of weeks or by a list of specific dates at the demo. I found the example of the way to disable weekends and dates specified(holidays). But the not finding a solution for the case that I need it to be implemented.
Thank you.
Hello,
My widgets just stopped working! I am getting the error "Script5009 Kendo not defined". It seems the browser does not know what to do with the widgets. I am not getting any errors otherwise.
I am running version 2018 3.0727.
Should I rerun the ProgressControlPanelSetup_2018_3_0727.exe to reinstall?
Thanks for your help!
Carolyn
Hello,
I am trying to implement a dropdownlist in a grid popupedit, that select Users from Azure Active Directory. I access the Azure Active Directoty with the Graph Api, so that I always get only a part of the users in the controller to return to the dropdownlist.
The controller sends the data of the users as SelectListItems (Text: Lastname, Firstname; Value: E-Mail).
The selection of a user in a new record works fine and the email address is saved in the database.
But if I want to edit this record, the dropdownlist is empty, because the dropdownlist needs the value for "Text" the Lastname and Firstname.
Is it possible to insert a value for Text and Value in the DropDownList, when editing a record?