Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Emily FosterRank #3,495 · 415 reputationPosted Feb 22, 2025, 1:39 PM EST
Certainly! A Kendo UI Grid with a MultiColumnComboBox in ASP.Net Core can be a powerful tool for displaying tabular data while allowing users to select values from a dropdown list with multiple columns. This combination provides a user-friendly interface for data manipulation and selection within a web application.
To implement this in ASP.Net Core using Kendo UI, you would typically define your Kendo UI Grid and MultiColumnComboBox in your Razor view. Here is a simplified example to illustrate this concept:
@(Html.Kendo().Grid() .Name("grid") .Columns(columns => { columns.Bound(p => p.Id); columns.Bound(p => p.Name); columns.ForeignKey(p => p.CategoryId, (System.Collections.IEnumerable)ViewBag.Categories, "Id", "Name"); }) .DataSource(dataSource => dataSource .Ajax() .Read(read => read.Action("GetProducts", "Product")) ) ) @(Html.Kendo().MultiColumnComboBox() .Name("multiColumnComboBox") .Placeholder("Select product...") .DataTextField("ProductName") .Columns(columns => { columns.Add("ProductName").Title("Product Name"); columns.Add("UnitPrice").Title("Unit Price"); }) .DataSource(source => { source.Read(read => { read.Action("GetProducts", "Product"); }) .ServerFiltering(true); }) )In this example:
- The Kendo UI Grid displays data with columns like Id, Name, and a CategoryId column bound to a MultiColumnComboBox for selecting categories.
- The MultiColumnComboBox allows users to search and select products based on multiple columns like ProductName and UnitPrice.
- Both components are configured to fetch data asynchronously from a controller action ("GetProducts" in this case) using AJAX requests.
By combining the Kendo UI Grid with a MultiColumnComboBox, you can enhance the user experience by providing a seamless interface for viewing and selecting data within your ASP.Net Core application.
I hope this example gives you a clearer idea of how to implement a Kendo UI Grid with a MultiColumnComboBox in ASP.Net Core. Let me know if you need further clarification or have any specific questions!