Hi all,
I have a grid with multiple cascading dropdown columns, each dropdown gets filtered calling a method in my controller.
What I want now it is simply populate a non editable text column based on the value from one of my previous dropdowns calling a filter method on my controller.
Thank you
LnZ
Hi,
We are using the current culture fr-BE which uses dd-MM-yyyy format but when using the DatePicker and inspecting the HTML, we see the following.
As you can see in the screenshot below, the culture is correctly set.
This happens only with fr-BE, we can see no problems when switching between nl-NL, en-GB, nl-BE, etc.
When we add .Format("d") the component works correctly but that's not what I would expect, since "d" is the default.
And to be honest, I don't want to add that manually everywhere. It should take the correct one as a default.
Our current version is 2022.3.913 but updating is not possible at the moment.
Any help would be appreciated
Kind regards
Hi I'm attempting to repeat a vehicle (year/make/model) set of cascading dropdown lists in a component that would result in up to 3 vehicle selectors on the same form. Running into issues as the ddls have the same ids. I've been playing around with appending counters to the name etc but running into the issue where the last set of ddls gets the data. Wondering
1. If there is a working example of this scenario
2. If it is possible to pass a value to the filter function
Thanks.
I'm having an issue with a Grid component. I have 2 custom editors for 2 small dropdown lists. Anytime I select anything other than the default options for either (or both) dropdown lists, the default still gets assigned to the field for some reason. I've tried debugging but it seems that it's getting changed before anything is sent to the controller (defaults are already present in the post action).
I set the custom editors up using the instructions here.
This is the component itself
@(
Html.Kendo().Grid<CHAASAddInsuredsViewModel>()
.Name("AddlInsureds")
.Columns(columns =>
{
columns.Bound(c => c.FirstName).Width(130);
columns.Bound(c => c.MiddleInitial).Width(70);
columns.Bound(c => c.LastName).Width(150);
columns.Bound(c => c.DOB).Format("{0:MM/dd/yyyy}").Width(150);
columns.Bound(c => c.RelationshipType)
.ClientTemplate("#=RelationshipType.RelationshipName#")
.EditorTemplateName("RelationshipTypeEditor").Width(140);
columns.Bound(c => c.Gender)
.ClientTemplate("#=Gender.GenderName#")
.EditorTemplateName("GenderEditor").Width(150);
columns.Bound(c => c.SSN).Width(160)
.HtmlAttributes(new { @class = "text-center" });
@* .EditorTemplateName("SSNEditorTemplate"); *@
@* .ClientTemplate("<h4>XXX-XX-XXXX</h4>"); *@
columns.Command(c => { c.Edit(); c.Destroy(); });
}
)
.ToolBar(toolbar => toolbar.Create().Text("Add Family Member"))
.Editable(editable => editable.Mode(GridEditMode.InLine)
.ConfirmDelete("Continue to delete this record?")
.DisplayDeleteConfirmation("Continue to delete this record?"))
.Sortable()
.Scrollable()
@* .HtmlAttributes(new { style = "height:550px;" }) *@
.DataSource(d => d
.Ajax()
.Model(m =>
{
m.Id(i => i.Id);
m.Field(f => f.RelationshipType)
.DefaultValue(ViewData["defaultRelationshipType"] as HNL_Agents.Models.AddlInsuredRelationshipType);
m.Field(f => f.Gender)
.DefaultValue(ViewData["defaultGender"] as HNL_Agents.Models.AddlInsuredGender);
})
.Events(e => e.Error("error_handler"))
.Create(c => c.Action("Insured_CreateUpdate", "CHAAS", new { modelAppId = Model.AppId }))
.Read(r => r.Action("GetInsureds", "CHAAS", new { modelAppId = Model.AppId}))
.Update(c => c.Action("Insured_CreateUpdate", "CHAAS", new { modelAppId = Model.AppId }))
.Destroy(d => d.Action("RemoveInsureds", "CHAAS"))
)
)
My model is as follows.
public class CHAASAddInsuredsViewModel
These are the custom editors for the drop down lists
@(
Html.Kendo().DropDownList()
.Name("RelationshipType")
.DataValueField("RelationshipId")
.DataTextField("RelationshipName")
.BindTo((System.Collections.IEnumerable)ViewData["relationshipTypes"])
)
@(
Please let me know if there is anything I'm missing or if you need any more information. Thanks for the help!
Hi,
I am getting extra characters like þÿPDF Check in metadata of the exported PDF from Kendo grid. That reflects into the title of the PDF in chrome browser.
Is there any way to remove that extra characters from the metadata using jQuery?
I am attaching screenshot of the PDF file.
Hello, I am trying to make a function that can resize my spreadsheet sheet dynamically based on the data, which is load on the sheet.
I know that the Spreadsheet has a function called "resize". I pass the numbers of columns and rows with a ViewBag, from the controller to the View on JS.
Controller:
public ActionResult Menus_Read([DataSourceRequest] DataSourceRequest request)
{
try
{
List<MenuViewModel> menus = db.GetMenus();
DataSourceResult result = menus.ToDataSourceResult(request);
ViewBag.RowCount = menus.Count;
ViewBag.ColumnCount = typeof(MenuViewModel).GetProperties().Length;
return Json(result, JsonRequestBehavior.AllowGet);
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
ModelState.AddModelError(string.Empty, ex.Message);
return Json(new[] { new object() }.ToDataSourceResult(request, ModelState), JsonRequestBehavior.AllowGet); ;
}
}
JS:
$(document).ready(function() {
var rowCount = @(ViewBag.RowCount);
var columnCount = @(ViewBag.ColumnCount);
var spreadsheet = $("#spreadsheet").data("kendoSpreadsheet");
var sheet = spreadsheet.activeSheet();
sheet.resize(rowCount, columnCount);
});
To use the ViewBag content for the view I first need to get the data, to check the count of the columns and rows. Maybe this could be my problem, the timing.
Has anyone had a similar problem or can help me?
I have a simple MVC Grid
with a column that looks like this
columns.Bound(c => c.FirstName).Filterable(fi => fi.Cell(ce => ce.Operator("contains").SuggestionOperator(FilterType.Contains)));
the grid is just
.Filterable()
Searching and GPT told me to do it this way, however when I filter that column I still only get the default filter of Equals
https://imgur.com/FewY7E0
Hi there! I'm not a developer but working with one to try and get a fix for my web application. This specific issue is not happening on any desktop computer but appears to be happening on my MacBook Pro when using Safari (not Chrome) and my 5th Gen iPad in both Safari and Chrome. When access a specific section of the program it begins to 'tab' through every field on that page endlessly. When I check the network log it states 'PerformValidationActions' appears to be in a loop cycling through 'text1_enter' 'text1_leave' 'text2_enter' 'text2_leave' 'text3_enter' 'text3_leave' etc. It EVENTUALLY ends but then when you try to log out you get the error Object reference not set to an instance of an object.
Any help would be GREATLY appreciated!
How to display the "File(s) saved successfully in the Custom Kendo Upload Template.
Using the template below:
<span class='k-progress'></span>