This is a migrated thread and some comments may be shown as answers.

RadGrid GridBoundColumn with DataField as DateTime cant apply AutoPostBackonFIlter

1 Answer 71 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dinesh
Top achievements
Rank 1
Dinesh asked on 06 Mar 2014, 02:57 PM
Hi All,
We have BoundColumn with DateTime as DataField , we are using RadDatePicker for filtering purposes as shown in this demo for "Shipped Date" Column 
http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/filter-templates/defaultcs.aspx  .
Once we apply filter , the filter happens , but we are not able to clear the filter .
We have tried using AutoPostBackonfilter ="true" and by using RadAjaxCreated Method to clear the filter but it doesnot clear the filter.
Please update on how to resolve this problem .

-Dinesh

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 07 Mar 2014, 04:16 AM
Hi Dinesh,

You can have a clear filter button and have the following code in it to clear the filters. If this didn't help, please provide your code snippet.

C#:
RadGrid1.MasterTableView.FilterExpression = string.Empty;
foreach (GridColumn column in RadGrid1.MasterTableView.RenderColumns)
{
    if (column is GridBoundColumn)
    {
        GridBoundColumn boundColumn = column as GridBoundColumn;
        boundColumn.CurrentFilterValue = string.Empty;
    }
}  
RadGrid1.MasterTableView.Rebind();

Thanks,
Princy
Tags
Grid
Asked by
Dinesh
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or