Filter Time Column

2 posts, 0 answers
  1. Joel
    Joel avatar
    206 posts
    Member since:
    Jun 2018

    Posted 21 Feb 2020 Link to this post

    I have separated a timestamp in my model so that I can get a good filtering experience in the grid. However, the filtering mechanism for the Time column remains the calendar.  How do I set this to filter using a time picker?  Also, as defined I expected there to be no filter for the Time column.  But, there is one.  How do I turn off the filter of this column if it shows even with no definition?


        .Columns(columns =>
            columns.Command(command => command
            columns.Bound(p => p.Device.Name).Title("Device")
                .Filterable(ftb => ftb.Cell(cell => cell.Operator("contains")
            columns.Bound(p => p.Date).Title("Date").Format("{0:MM/dd/yyyy}")
                .Filterable(ftb => ftb.Cell(cell => cell.Operator("gte")
            columns.Bound(p => p.Time).Title("Time").Format("{0:hh:dd:mm tt}");
        .Filterable(ftb => ftb.Mode(GridFilterMode.Row))
        .HtmlAttributes(new { style = "height:596px;" })
        .DataSource(dataSource => dataSource
        .Read(read => read.Action("IndexJson", "Sessions")
    function getData() {
        return @Html.Raw(Model.GetIndexData());
    function goDetail(e) {
        var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
        var url = '@Url.Action("Details", "Sessions")?id=' + dataItem.Id + '@Model.GetUrlParameters()';
        // Replace & with & as the above encoding step changes & to &.
        window.location.href = url.replace(/&/g, "&");
    function error_handler(e) {
        if (e.errors) {
            var message = "Errors:\n";
                function(key, value) {
                    if ('errors' in value) {
                            function() {
                                message += this + "\n";
  2. Georgi
    Georgi avatar
    695 posts

    Posted 26 Feb 2020 Link to this post

    Hello Joel,

    You could create a custom filter widget via the column.Filterable.Cell.Template handler.


    // column
            columns.Bound(p => p.Device.Name).Title("Device")
                .Filterable(ftb => ftb.Cell(cell => cell.Operator("contains")
    // timeFilter handler
    function  timeFilter (args) {

    Furthermore, currently filtering is visible for the Time column as the global Filterable setting is enabled. Nevertheless, you could disable filtering for certain column as follows:

    columns.Bound(p => p.Time).Title("Time").Format("{0:hh:dd:mm tt}").Filterable(false);

    I hope this helps.

    Progress Telerik

    Get quickly onboarded and successful with Telerik UI for ASP.NET Core with the dedicated Virtual Classroom technical training, available to all active customers.
Back to Top