Is there a built-in method like jQuery's serializeArray to pull the values for all the Kendo controls in a form? I recently found that the Html helper and Kendo CheckBox control creates hidden input tags for each CheckBox. The hidden fields are always set to "false". When I construct the model object after retrieving the values using serializeArray, the user input is overridden with the false values from the hidden fields. I cannot reject hidden fields as I have other hidden fields needed for my scenario. Some of our models are pretty big and it is tedious to construct each control in order to retrieve the user inputs.
The forms are mostly templates within a dialog invoked on Grid change event as the popup edit does not work with a custom template.


Question 1: I have a bool field that I want to show as a checkbox (checked if true, unchecked if false). I added it to grid as far as I know how to but I know it isn't reflecting true or false because the checkbox is unchecked even if the value is true.
Question 2: when I check a checkbox and move on to another row, it does not stay checked and instead it reverts back to unchecked. How do I set it up so that it remains checked when I select another row?
@(Html.Kendo().Grid<ArusUI.Areas.PODashboard.Models.POModel>()
.Name("poGrid")
.Columns(columns =>
{
columns.Command(command => command
.Custom("Print")
.Click("printRow"))
.HtmlAttributes(new { title = "PO" })
.Width(150);
columns.Bound(p => p.resend)
.Title("Resend")
.Editable("isResendEditable")
.ClientTemplate("#if(poEdiObjectMode == 'EMAIL'){# <input id='resend_' onclick='resendSelect(this)' name='resend_#=poNum#_#=poReleaseNbr#_#=poRevisionNbr#' value='#=resend#' class='k-checkbox' type='checkbox' /> #} else {# <p> </p> #}#")
.Width(135)
.Filterable(ftb => ftb.Multi(true))
.HtmlAttributes(new { style = "text-align:center;" });
columns.Bound(p => p.resend)
.Width(110)
.HtmlAttributes(new { @class = "kendo-column", style = "text-align:center;" })
.Editable("isResendEditable")
.ClientTemplate("#if(poEdiObjectMode == 'EMAIL'){# <input type ='checkbox' id='poResend_#=poNum#' class='k-checkbox' /> #} else {# <input type ='checkbox'id='poResend_#=poNum#' class='k-checkbox' disabled='disabled' /> #}#");
columns.Bound(p => p.poNum).Width(130).Editable("readOnlyCol").HtmlAttributes(new { @class = "disabled-kendo-column" });
columns.Bound(p => p.poReleaseNbr).Width(130).HtmlAttributes(new { @class = "disabled-kendo-column" });
columns.Bound(p => p.poRevisionNbr).Width(130).HtmlAttributes(new { @class = "disabled-kendo-column" });
columns.Bound(p => p.poIssueDT)
.Width(150)
.Format("{0:MM/dd/yyyy}")
.HtmlAttributes(new { @class = "disabled-kendo-column" });
columns.Bound(p => p.poEdiObjectMode)
.Width(100)
.Filterable(ftb => ftb.Multi(true))
.HtmlAttributes(new { @class = "disabled-kendo-column" });
})
.Editable(editable => editable.Mode(GridEditMode.InCell))
.Selectable(selectable => selectable
.Mode(GridSelectionMode.Single))
.Scrollable(scrollable => scrollable.Endless(true))
.Scrollable(a => a.Height("650px"))
.PersistSelection(true)
.Navigatable()
.Sortable()
.Filterable(filterable => filterable
.Extra(true)
.Operators(ops => ops
.ForString(str => str.Clear()
.Contains("Contains")
.DoesNotContain("Does not contain")
.IsEqualTo("Is equal to")
.IsNotEqualTo("Is not equal to")
.StartsWith("Starts with")
.EndsWith("Ends with")
.IsNull("Is null")
.IsNotNull("Is not null")
.IsEmpty("Is empty")
.IsNotEmpty("Is not empty"))))
.AutoBind(false)
.Excel(excel => excel
.FileName("PODashboard.xlsx")
.Filterable(true)
.AllPages(true)
.ProxyURL(Url.Action("Excel_Export_Save", "poGrid")))
.Reorderable(reorder => reorder.Columns(true))
.ClientDetailTemplateId("template")
.Events(e => e.DataBound("poGridDataBound"))
.Events(e => e.CellClose("POGridCellClose"))
.DataSource(dataSource => dataSource
.Ajax()
.ServerOperation(false)
.PageSize(25)
.Events(x => x.Error("onGridError"))
.Read(read => read.Action("GetPO","PO").Data("getPOParams").Type(HttpVerbs.Get))
.Model(model =>
{
model.Id(m => m.poNum);
model.Field(field => field.poReleaseNbr).Editable(false);
model.Field(field => field.poRevisionNbr).Editable(false);
model.Field(field => field.poIssueDT).Editable(false);
model.Field(field => field.poEdiObjectMode).Editable(false);
model.Field(field => field.resend).Editable(true);
})
).Resizable(resize => resize.Columns(true))
)function isResendEditable(e) {
var ediType = e.poEdiObjectMode; var editable = false;
if (ediType == "EMAIL") { editable = true; }
return editable;
}public class POModel
{
[DisplayName("Vendor")]
public string vendorName { get; set; }
[DisplayName("PO #")]
public string poNum { get; set; }
[DisplayName("Buyer")]
public string buyer { get; set; }
[DisplayName("Release #")]
public string poReleaseNbr { get; set; }
[DisplayName("Revision #")]
public string poRevisionNbr { get; set; }
[DisplayName("Original Issue")]
public string poIssueDT { get; set; }
[DisplayName("EDI Type")]
public string poEdiObjectMode { get; set; }
public bool resend { get; set; }
}\
I am using a form in a .net Core project. I want to disable/enable a maskedtextbox based on ViewBag properties. It works for regular text boxes, but not a masked text box. Here is a portion of my code:
i.Add()
.Field(f => f.LastName)
.Label(l => l.Text("Last Name:"))
.Editor(e =>
{
e.TextBox().Enable(ViewBag.canEdit);
});
i.Add()
.Field(f => f.CellPhone)
.Label(l => l.Text("Cell Phone:"))
.Editor(e =>
{
e.MaskedTextBox().Mask("(000) 000-0000").Enable(ViewBag.canEdit);
});

Hey guys,
I know that your intention with the kendo button was always to render a button of type "button". Also I know you're providing a kendo form widget to render a full form with a submit button.
But isn't there any solution to achive a basic html form and then render a kendo button of type "submit"? I know I can change it with jquery manually afterwords or by registrating an function which will fire the submit again, but i would only use this when there isn't any built in solution to force it as type submit.
My intention was to render the kendo button with the tag helper and then manually set the type but it will be always overridden back to type "button" instead of keeping it as "submit".
<kendo-button name="btnSubmit" theme-color="ThemeColor.Primary" class="float-right" type="submit">
Speichern
@(Html.Kendo().Loader()
.Name("loader")
.HtmlAttributes(new { aria_busy = "false", aria_description = InfoMessages.LoadingOperation, aria_live = "polite" })
.Size(LoaderSize.Small)
.ThemeColor(LoaderThemeColor.Light)
.Type(LoaderType.InfiniteSpinner)
.Visible(false)
)
</kendo-button>Good afternoon,
Is there an easy way to use the built-in Grid popup edit window to only edit a few model fields rather than all of them?
I want an edit popup with three fields, update and cancel, and to prepopulate with the values from the grid row.
Can this be achieved, or will I need to build a custom popup window?
Kind regards,
Richard

Hey guys,
I have a problem with my HtmlHelper. My ButtonBuilder does not contain a definition for ThemeColor (like described on your demo page here). Funny is that my KendoLoader does have that. Any suggestions (see my picture)?
I had that error with the Kendo Release R3 2021 and currently I've updated to the current last version (2022.1.119) through Progress Control Panel and still it is.
FYI: @using Kendo.Mvc.UI is in my _ViewImports included. There is no change when I implement that code line into my current view.
@(Html.Kendo().Loader()
.Name("loaderDropDown")
.Size(LoaderSize.Medium)
.ThemeColor(LoaderThemeColor.Dark)
.Type(LoaderType.InfiniteSpinner)
.Visible(false)
)
@(Html.Kendo().Button()
.Name("btnEditPrivacy")
.Icon("edit")
.HtmlAttributes(new { style = "min-width: 27px;", title = "Datenschutzerklärung bearbeiten" })
.ThemeColor(ThemeColor.Primary)
)
Edit:
Alright guys, it was my fault. I forgot to update my telerik nuget package. Now it's working! Thanks anyways!
I am struggling to understand how to handle create operations when ListView contents must be associated with a parent object. To demonstrate by using examples from your docs, let's say the orders are part of a store object:
public class StoreViewModel
{
public int StoreID {get; set;}
IEnumerable<OrderViewModel> StoreOrders {get; set;}
// various other fields
}
My goal is to have a View, Model type is the StoreViewModel, and a ListView showing the Orders from a specific store. The Create function of the ListView would need to know the store ID and have it passed somehow. I think I need something like this:
@model StoreViewModel
@(Html.Kendo().ListView<OrderViewModel>()
.DataSource(ds => ds
.Ajax()
.Model(m => m.("OrderID")
.Read(read => read
.Action("Orders_Read", "ListView")
.Data(@<text>@Html.Raw(Json.Serialize(Model))</text>)
)
.Create(create => create
.Action("Orders_Create", "ListView")
.Data(@<text>@Html.Raw(Json.Serialize(Model))</text>)
)
)
)
The controller has this method for read, which works perfectly:
public ActionResult Orders_Read([DataSourceRequest]DataSourceRequest request, StoreViewModel store)
{
// code that returns orders from one store
}
However, when I try to create, the same .Data parameter doesn't seem to be passed:
public ActionResult Orders_Create([DataSourceRequest]DataSourceRequest request, StoreViewModel store)
{
// misc code to make a new order and add to DB goes here
newOrder.StoreID = store.StoreID; // this fails
}
When looking through this with the debugger, "store" is populated in the Orders_Read method, but is null in the Orders_Create method, even though I'm trying to use them the same way. While that's concerning, I suspect there's an overall better way to do this period. Are there any examples that show similar scenarios with related models/objects?