HI I am using asp.net mvc .net (not core). I have a grid which has paging . Pagig size is 20. Now lets say I have functionality for download excel file and pdf file. When user click on the download I want to download all the data not just what user see on the particular page.
Thanks

I'm trying to create a 3 level hierarchy grid, but for some reason the second level doesn't show the expand button.
The only reason the 3rd level is expanded in the pic is because of the dataBound script, which expands everything.
How do I make the second level expandable?
Here's the code:
@(Html.Kendo().Grid(Model.SalaryApprovalEmployments)
.Name("grid")
.Columns(columns =>
{
columns.Bound(e => e.Id).Width(100);
columns.Bound(e => e.TotalCost).Width(100);
columns.Bound(e => e.Trend).Width(100);
})
.DataSource(dataSource => dataSource
.Ajax()
.Model(model =>
{
model.Id(sae => sae.Id);
})
.ServerOperation(false)
)
.Events(events => events.DataBound("dataBound"))
.ClientDetailTemplateId("salaryCodeTemplate")
.HtmlAttributes(new { style = "width:600px;" })
)
<script id="salaryCodeTemplate" type="text/kendo-tmpl">
@(Html.Kendo().Grid<SalaryApprovalTransactionDTO>()
.Name("grid_#=Id#")
.Columns(columns =>
{
columns.Bound(o => o.SalaryApprovalEmploymentId).Width(100);
columns.Bound(o => o.SalaryCodeId).Width(100);
columns.Bound(o => o.Amount).Width(100);
})
.DataSource(dataSource => dataSource
.Ajax()
.Model(model =>
{
model.Id(sat => sat.SalaryCodeId);
})
.Read(read => read.Action("HierarchyBindingTransactions", "SalaryApproval",
new { salaryApprovalGroupId = Model.Id, salaryApprovalEmploymentId = "#=Id#" }))
)
.Events(events => events.DataBound("dataBound"))
.ClientDetailTemplateId("transactionTemplate")
.ToClientTemplate()
)
</script>
<script id="transactionTemplate" type="text/kendo-tmpl">
@(Html.Kendo().Grid<SalaryApprovalTransactionDTO>()
.Name("grid_#=SalaryApprovalEmploymentId#_#=SalaryCodeId#")
.Columns(columns =>
{
columns.Bound(o => o.SalaryCodeId).Width(100);
columns.Bound(o => o.UnitPrice).Width(100);
columns.Bound(o => o.Hours).Width(100);
columns.Bound(o => o.Days);
columns.Bound(o => o.Amount).Width(100);
})
.DataSource(dataSource => dataSource
.Ajax()
.Model(model =>
{
model.Id(sat => sat.Id);
})
.Read(read => read.Action("HierarchyBindingTransactions", "SalaryApproval",
new { salaryApprovalGroupId = Model.Id, salaryApprovalEmploymentId = "#=SalaryApprovalEmploymentId#", salaryCodeId = "#=SalaryCodeId#" }))
)
.ToClientTemplate()
)
</script>
<script>
function dataBound() {
var grid = this;
this.tbody.find("tr.k-master-row").each(function( index ) {
grid.expandRow(this);
});
}
</script>

Hi I am using the Autocomplete textbox. It finding to the datasource fine. Just like Product is being used in the demo.
1. My question is if I have a product list. And it has the column product type , and I want to captrue the value of prodcut type then how I can do that. Product is binds with the userId.
2. I have a model class as
ModelViewMY {
date TodaysDate {get;set} // date is not part of the list.
List<Users> Users {get;set}
}
Question now: if I am using the AutoComplete in my mvc project then how I can set the DataTextFiled(Useres.UserId). I tried but I am getting errors.
@(Html.Kendo().AutoComplete()
Hello,
I have a kendo grid, with custom filter in some columns defined like this:
c = columns.Bound(x => x.Field1).Title("Field1").Width(130).Filterable(filterable => filterable.Extra(false).UI("customField1Filter").Operators(op => op.ForString(str => str.Clear().IsEqualTo("Is equal to"))));and
function customField1Filter(element) {
element.kendoDropDownList({
dataTextField: "Text",
dataValueField: "Value",
dataSource: {
transport:{
read: {
data: getdata(),
url: "@Url.Action("PopulateField1Filter", "Common")"
}
}
},
optionLabel: "--Select Value--"
});
}
It works fine, but in order to implement a complex cascading filtering betweent a lot of columns, I have to refresh the options of them.
For exemple: columns 1 display country, columns 2 display city, both are filterable. When I select a country on first filter, i have to refresh the options of the city filter.
How to programmacally refresh filter option of a specific column ? Or refresh filters of all columns witout refresh grid data ?
Thanks in advance
I have the following set of code for picking a start date and end date from user in the 'dd/MM/yyyy HH:mm tt' format.
<tr>
<td>Start DateTime</td>
<td>
@(Html.Kendo().DateTimePickerFor(model => model.StartDateTime).Name("StartDateTime").Format("dd/MM/yyyy HH:mm tt").ParseFormats(new string[] { "dd/MM/yyyy HH:mm tt" }).HtmlAttributes(new { style = "width:300px;", onkeydown="javascript:return false;" }))
</td>
</tr>
<tr>
<td>Expiration DateTime</td>
<td>
@(Html.Kendo().DateTimePickerFor(model => model.ExpirationDateTime).Name("ExpirationDateTime").Format("dd/MM/yyyy HH:mm tt").ParseFormats(new string[] { "dd/MM/yyyy HH:mm tt" }).HtmlAttributes(new { style = "width:300px;", onkeydown="javascript:return false;" }))
</td>
</tr>The javascript code is as follows :
$(document).ready(function () {
function onChange() {
var StartDateTime = $("#StartDateTime").val().split(" ");
var date = StartDateTime[0].split("/");
var time = StartDateTime[1].split(":");
var dd = date[0];
var MM = date[1];
var yyyy = date[2];
var HH = time[0];
var min = time[1];
var tt = StartDateTime[2];
StartDateTime = new Date(yyyy,MM-1,dd,HH,min);
var ExpirationDateTime = new Date(StartDateTime.setHours(StartDateTime.getHours() + 1));
$("#ExpirationDateTime").data("kendoDateTimePicker").value(ExpirationDateTime);
}
$("#StartDateTime").kendoDateTimePicker({
change: onChange,
format: "dd/MM/yyyy HH:mm tt",
parseFormats: ["dd/MM/yyyy HH:mm tt"]
}).data("kendoDateTimePicker");
$("#ExpirationDateTime").kendoDateTimePicker({
format: "dd/MM/yyyy HH:mm tt",
parseFormats: ["dd/MM/yyyy HH:mm tt"]
}).data("kendoDateTimePicker");
});The underlying model :
[Required(ErrorMessage = "Start Datetime is required.")]
[DataType(DataType.DateTime)]
public DateTime StartDateTime { get; set; }
[Required(ErrorMessage = "Expiration Datetime is required.")]
[DataType(DataType.DateTime)]
public DateTime ExpirationDateTime { get; set; }But whenever I do a sumbit, I get error saying :
But if the day(dd) is less than or equal to 12 , the date is accepted. How do I make it accept all dates and in the format I want?
