
How can I pass data from the client to the Read action for a MultiSelect using virtualization. Here is the declaration of the MultiSelect I'm using:
@(Html.Kendo().MultiSelectFor(model => model.SelectedProjectIds)
.Filter(FilterType.StartsWith)
.DataTextField("Name")
.DataValueField("Id")
.HtmlAttributes(new { style = "width: 100%" })
.Placeholder("- Select Project(s) -")
.DataSource(source =>
{
source.Custom()
.ServerFiltering(true)
.ServerPaging(true)
.PageSize(80)
.Type("aspnetmvc-ajax")
.Transport(transport =>
{
transport.Read("ProjectRead", "ProjectPlan");
})
.Schema(schema =>
{
schema.Data("Data")
.Total("Total");
});
})
.Virtual(v => v.ItemHeight(26))
)
I'd like to pass in some data in the Transport Read. Here is the action method for the Read:
[HttpPost]
public ActionResult ProjectRead([DataSourceRequest] DataSourceRequest request)
{
return Json((GetProjects() as List<NamedEntity>).ToDataSourceResult(request));
}
So, in addition to the DataSourceRequest object, I'd like to pass in a string from the client-side. How can this be done?

Hello,
I can get the multi filter to display or I can get the row filtering but I can't get both at once. My client is an excel experience heavy user and say the grid displays 700 records. They then want the ability to row filter and say that reduces it down to 350. Then they want to apply column value multi select filters to narrow the 350 down even further.
However I have tried a couple different combinations and while they don't error out I don't get both filters on one grid.
One attempt:
@(Html.Kendo().Grid(Model) .Name("grid") .Columns(columns => { columns.Bound(e => e.A).Filterable(ftb => ftb.Multi(true).Search(true)); columns.Bound(e => e.B).Filterable(ftb => ftb.Multi(true).Search(true)); columns.Bound(e => e.C).Filterable(ftb => ftb.Multi(true).Search(true)); columns.Bound(e => e.D).Filterable(ftb => ftb.Multi(true).Search(true)); columns.Bound(e => e.E).Filterable(ftb => ftb.Multi(true).Search(true)); }) .HtmlAttributes(new { style = "width: 80%;" }) .DataSource(data => data.Ajax().Model(mdl => mdl.Id(p => p.A) )) .Scrollable() .Groupable() .Sortable() .Editable() .Filterable(ftb => ftb.Mode(GridFilterMode.Row)) .Resizable(size => size.Columns(true)) .Selectable(selectable => selectable.Mode(GridSelectionMode.Multiple)) .Pageable(pageable => pageable .Refresh(true) .PageSizes(true) .ButtonCount(5)) )
Another attempt:
@(Html.Kendo().Grid(Model) .Name("grid") .Columns(columns => { columns.Bound(e => e.A).Filterable(ftb => ftb.Multi(true).Search(true)).Filterable(ftb => ftb.Mode(GridFilterMode.Row)); columns.Bound(e => e.B).Filterable(ftb => ftb.Multi(true).Search(true)); columns.Bound(e => e.C).Filterable(ftb => ftb.Multi(true).Search(true)); columns.Bound(e => e.D).Filterable(ftb => ftb.Multi(true).Search(true)); columns.Bound(e => e.E).Filterable(ftb => ftb.Multi(true).Search(true)); }) .HtmlAttributes(new { style = "width: 80%;" }) .DataSource(data => data.Ajax().Model(mdl => mdl.Id(p => p.A) )) .Scrollable() .Groupable() .Sortable() .Editable() .Filterable() .Resizable(size => size.Columns(true)) .Selectable(selectable => selectable.Mode(GridSelectionMode.Multiple)) .Pageable(pageable => pageable .Refresh(true) .PageSizes(true) .ButtonCount(5)) )
Thoughts?
JB
I am getting this error "The Type or Namespace name ' GridAction' could not be found" while upgrading the application from version 2011.2.712 to 2018.3.1017.
Please let me know how to solve this error.
Hi,
I am using a hierarchical (master/detail) grid. After I click to save changes to the detail grid, I would like to update the contents of a particular cell in the master. This displays summary data from the details grid. So, after the detail changes have been saved I need to make a server call to grab some data from the database and display it in that cell. How would I make this call, return the data and display it in my chosen cell in the parent? I appreciate that I could refresh the entire grid (or page) but would prefer to make an Ajax style update to make the process quicker and slicker.
Many thanks,
Colin
Hi,
I've got a problem with kendo culture and treeView read action.
I've got bilingual application, with en-US and pl-PL culture, which I set like this:
Client side: (var culture = "pl-PL" or "en-US")
<script src="@Url.Content("~/Scripts/kendo/cultures/kendo.culture." + culture + ".min.js")"></script> <script src="@Url.Content("~/Scripts/kendo/messages/kendo.messages." + culture + ".min.js")"></script> <script>kendo.culture("@culture");</script>Server side: (ex.: CultureInfo cultureInfo = new CultureInfo("pl-PL");)
Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture = cultureInfo;It seems to work well.
I've got a view with grid and treeView. Both has read action with additional data, getting like this:
.Read(read => read.Action(@"ReadOfertyTree", @"Oferty").Data(@"filterGrid")) <- treeView(...).Read(read => read.Action(@"ReadOferty", @"Oferty").Data(@"filterGrid")) <- grid(...)function filterGrid() { return { dataOd: dataOd, dataDo: dataDo, klient: klient, zamow: zamow }; }dataOd and dataDo both are read from kendoDatePicker. In both cases I can see in network in my browser, that date is sending in format dd.MM.yyy for pl culture and MM/dd/yyyy for en culture. In case of en, everything is allright BUT in pl case I faced with strange behaviour.
In controller's action read for grid I got dates:
1.11.2018 is read as 1st of november 2018
30.11.2018 is read as 30th of november 2018
BUT in treeView read action I've got:
1.11.2018 is read as 11th of january 2018
30.11.2018 is read as null
I don't set culture in any other places. Both controlls are in the same cshtml file and both read action in the same controller. What's wrong?
Hi - I need help in attaching a Tooltip to a
dropdown in my grid – to display additional details for each item in the
dropdown list
I
have not been able to adapt any of the Tooltip examples I have found – hoping someone
can help
My
mvc grid column editor template is defined as
columns.Bound(c
=> c.MostRecentTollGate).EditorTemplateName("MostRecentTollGateDDL").Width(150).Filterable(ftb
=> ftb.Multi(true).Search(true))
My editor
dropdown is as follows
@(Html.Kendo().DropDownListFor(m
=> m)
.DataValueField("MostRecentTollGate1")
.DataTextField("MostRecentTollGate1")
.Filter("contains")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("TableRead", "ForecastDetails", new { tableIn = "MostRecentTollGate" }).Data("getGroupType");
});
})
)
the drop down works fine - now i need to add a tooltip
Thanks
Jim
Hello,
In my project, we have to provide pdf export for all of our grids. When they are small, there is no real problems. But when we have like 10 or more columns and multiple pages, it seems we can't extract all the columns and the export will only show like 6 columns and only the first page...
Is there another way to display all columns without changing scaling (making text unreadable) or the format size ? (We don't want to print in A0 either...)
Thanks in advance !
