When filtering on a date column in the grid, the dates are filtered by time as well as by date. This creates a problem when trying to filter with "equals to".
I can easily remove the time from the date object in the grid and this fixes the filtering.
However, I might need to display the time in the date object in the grid.
How can I have the dates filtered while ignoring the time, or alternatively display the date with the time, but filter with a date object without the time?
Thanks
I can easily remove the time from the date object in the grid and this fixes the filtering.
However, I might need to display the time in the date object in the grid.
How can I have the dates filtered while ignoring the time, or alternatively display the date with the time, but filter with a date object without the time?
Thanks
I have the same problem.
this is my grid and I want to filter only by the date , can you please give me more details how to do it?
@(Html.Kendo().Grid<ServicingMoneyManagerUI.Models.TransactionViewModel>()
.Name("TransactionGrid")
.Columns(columns =>
{
columns.Bound(c => c.ACHData.ACHID).Title("ACH ID").Width(140);
columns.Bound(c => c.TransactionDate).Title("Date").Format("{0: MM/dd/yyyy}").Width(110);
columns.Bound(c => c.ACHData.Amount).Title("Amount").Width(120).Format("{0:c}");
columns.Bound(c => c.UserName).Title("User Name").Width(130);
columns.Bound(c => c.ClearTouchAccountToWorkWith).Title("Cleartouch").Width(140);
columns.Bound(c => c.ACHData.ToName).Title("From Name").Width(140);
columns.Bound(c => c.TransactionState).Title("Status").Width(140);
columns.Bound(c => c.ACHData.Description).Title("Comment").Width(140);
//columns.Command(command => { command.Edit().CancelText(" ").UpdateText(" ").Text(" "); }).Width(100);
})
//.HtmlAttributes(new { style = "height: 70%;" })
.Filterable()
.Editable(editable => editable.Mode(GridEditMode.InLine))
.ToolBar(toolbar =>
{
toolbar.Custom().HtmlAttributes(new { id = "btn-print" }).Text("PRINT TRANSACTIONS");
toolbar.Pdf();
toolbar.Excel();
})
.Excel(excel => excel
.AllPages(true)
.FileName("TransactionsExport.xlsx")
.Filterable(true)
.ForceProxy(true)
.ProxyURL(Url.Action("Excel_Export_Save", "Home")))
.Pageable(pager => pager
.Refresh(true)
.PageSizes(true)
.PageSizes(new int[] { 6, 15, 20 })
.ButtonCount(5))
.Sortable(sortable =>
{
sortable.SortMode(GridSortMode.MultipleColumn)
.Enabled(true);
})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Model(model =>
{
model.Id(item => item.ID);
//model.Field(m => m.ACHData.ACHID).Editable(false);
})
.Read(read => read.Action("GetTransactions", "Transaction"))
/*.Update(update => update.Action("UpdateProduct", "Product"))*/)
.Selectable(selectable => selectable
.Mode(GridSelectionMode.Multiple)
.Type(GridSelectionType.Row))
.Events(events => events.Change("OnSelectTransaction"))
.Scrollable()
.Pdf(pdf => pdf
.AllPages()
.AvoidLinks()
.PaperSize("A4")
.Scale(0.8)
.Margin("1cm", "1cm", "1cm", "1cm")
.Landscape()
.RepeatHeaders()
.TemplateId("page-template")
.FileName("TransactionsExport.pdf")
.ForceProxy(true)
.ProxyURL(Url.Action("Pdf_Export_Save", "Home")))
)
Thanks!