I have a application that has a kendo grid.
I can filter the grid using several dropdownlists that are outside the grid.
When I click on search, I add filters to the datasource filter list. For example,
var dataSource = $("#grid").data("kendoGrid").dataSource;
var dataSourceFilterQuery = new Array();
if ($("#something").data("kendoDropDownList").value() !== null) {
dataSourceFilterQuery.push({ field: "something", operator: "IsGreaterThanOrEqualTo", value: ($("#something").data("kendoDropDownList").value()) });
}
dataSource.filter(dataSourceFilterQuery);
Then I get the results I want. It works.
I then have the possibility of saving the values of all the dropdownlists as one filter in localStorage.
const filtersObject = {
Something: whatever.value(),
...
};
this.storage.setItem("Filter", JSON.stringify(filtersObject));
When I restart the application, the dropdownlists are populated with whatever is in localStorage
const filter = JSON.parse(localStorage.getItem("Filter"));
$("#something").data("kendoDropDownList").value(filters.whatever || "");
}
The thing is, I wanted to add these filters, if they exist on localStorage, to the datasource when the application starts so that the user can see the results of the filter he saved when the applications starts and not have to click on search again.
So, what I want is to do apply this
var dataSource = $("#grid").data("kendoGrid").dataSource;
var dataSourceFilterQuery = new Array();
if ($("#something").data("kendoDropDownList").value() !== null) {
dataSourceFilterQuery.push({ field: "something", operator: "IsGreaterThanOrEqualTo", value: ($("#something").data("kendoDropDownList").value()) });
}
dataSource.filter(dataSourceFilterQuery);
before the grid is displayed.
Is this possible?
Tks in advance.
I have a page with a Kendo grid and several controls (picture 1).
It works fine, no problem here. I now have to replace the dropdownlist that is open in the picture with a multiselect.
After I changed the drop to a multi, which works just fine, something strange happened ( picture 2).
The layout is all messed up and the grid stopped working.
I change it back to drop and everything is back to normal.
The code for the drop is
@(Html.Kendo().DropDownList()
.Name("Name")
.OptionLabel("Select something...")
...
..BindoTo(new List>SelectListItem>
{
...
}}))
The code for the multiselect is
@(Html.Kendo.MultiSelect()
.Name("Something")
.PlaceHolde("Select something...")
...
.BindTo(new List<SelectListItem>
{
...
}}))
Any ideas?

I need to refresh my PieChart using calculation made in my controller using a DatePicker.
Despite the update of the Viewbag used for the series in my controller, It seems that the series are not updated when refreshing the Chart.
Any suggestions ?
MyView :
@(Html.Kendo().DatePicker() .Name("startDatepicker") .Value(DateTime.Now.ToShortDateString()) .Events(e => { e.Change("onStartDateChange"); }))@(Html.Kendo().Chart() .Name("chartWorkDuration") .Title(title => title.Text("Working time - Total : " + ViewBag.TotalWorkDuration.ToString() + "h") .Position(ChartTitlePosition.Bottom)) .ChartArea(chart => chart.Background("transparent")) .Series(series => series.Pie(ViewBag.arWorkDuration) .Padding(0) ) .Tooltip(tooltip => tooltip .Visible(true) .Format("{0:N0}") ))<script> function onStartDateChange() { var startDate = $("#startDatepicker").data("kendoDatePicker").value().toDateString(); $.ajax({ url: 'PlanningGraph/RefreshGraph', cache:false, data: { startDate: startDate }, success: function (xhr, textStatus) { $("#chartWorkDuration").data("kendoChart").refresh(); } }); }); }</script>My Controller
// Creation of my viewmodel elements.... var workDuration = graphElementViewModels.Select(w => new { category = w.strCategory, value = w.dblValue, color = w.strColor });ViewData["arWorkDuration"] = workDuration;



I found an issue and could not find on forums if anyone else has reported it. The steps are these
1. Grid with column reorder and column menu
2. On a column open the column menu to show/hide columns
3. Reorder the grid columns
4. Open the column menu for the same column => the columns in menu are in the initial state (before reorder)
5. Open column menu for any other column => the columns menu is in the correct state (after reorder)
Questions:
Is this issue going to be fixed in framework? If not is there a workaround for this issue?
On related note: Is there available a custom Widget that simulates the Show/Hide columns menu (having the visibility columns outside of the grid on a button related to this thread Add ColumnMenu To Custom Toolbar On Telerik MVC Grid).

I've tried using Ajax Binding (and also ToDataSourceResult Binding) from this article to populate a DropDownList. I copy/pasted the exact code from the article into my solution. The GetProducts method on the controller returns 78 products, yet the DropDownList stays empty.
What am I doing wrong?
Controller
public JsonResult GetProducts(){ NorthwindDataContext northwind = new NorthwindDataContext(); return Json(northwind.Products, JsonRequestBehavior.AllowGet);}
View
@(Html.Kendo().DropDownList() .Name("productDropDownList") .DataTextField("ProductName") .DataValueField("ProductID") .DataSource(source => { source.Read(read => { read.Action("GetProducts", "Home"); }) .ServerFiltering(true); }) .SelectedIndex(0) )
I am using the MVC Menu component, and I am using is in a slide out div. So hit a menu button, a div slides out from the side of the screen, showing menu choices. However, the menu itself (with a Vertical Orientation) fills up the entire div, and submenu items are not showing up because I assume they're being cut off by the div. I have tried setting an HtmlAttriibutes on the main menu itself, with a style of z-index: 1000 to ensure it's the top most, but that doesn't work. I've also tried using PopupCollisions to false, but I guess that's for something else entirely.
So my question is, if a menu is part of a popup or slide out div, how to ensure sub menu items get displayed, and secondly, where do I put in the URLs for these menu items? All the demos only show the menus, but not what should happen when a menu is clicked?
