This question is locked. New answers and comments are not allowed.
I need to know how I can get the default filter back in the grid.
I have a grid that sets the default filter as such
I have a function that is called when a button is clicked to clear the filters and then refilter the grid.
The grid shows filtered but the Filter Box is empty. Is there any way to get that Fitler box populated for the column I'm refiltering to?
I have a grid that sets the default filter as such
<% Html.Telerik().Grid<ActionAlertManagementSystem.Models.ActionAlertModel>().Name("Grid") .Columns( columns => { columns.Bound(o => o.MethodCaseId).ClientTemplate( "<a href=\"../actionalert/index/<#= aa#>\"> <#= aa #> </a>" ); columns.Bound(o => o.CreatedOn).Format("{0:MM/dd/yyyy}"); columns.Bound(o => o.LastModOn).Format("{0:MM/dd/yyyy}"); columns.Bound(o => o.WorkFLowStatus).Filterable(true); } ) .DataBinding( dataBinding => { dataBinding.Ajax().Select("_Index", "MyBusinessUnit", new {structureId = Model.StructureId, businessUnitId = Model.BusinessUnitId}).Enabled(true); }) .NoRecordsTemplate("<span style='display:none' id='noRecordTemplate'>Data were not found or you may not have permission to access these particular data. If you believe you received this message in error, please contact <a href=\"mailto:gohelp@gallup.com\" title=\"Send e-mail\">gohelp@gallup.com</a>.</span>") .Scrollable(scrolling => scrolling.Enabled(false)) .Sortable(sorting => sorting.Enabled(true)) .Pageable(paging => paging.Enabled(true)) .Filterable(filtering => filtering.Filters(filters => filters.Add(o => o.WorkFLowStatus).IsEqualTo("Open"))) .Footer(true) .ClientEvents(events => events.OnLoad("Grid_Load").OnDataBinding("Grid_Binding").OnDataBound("Grid_Bound").OnError("Grid_Error") ) .Render(); %>I have a function that is called when a button is clicked to clear the filters and then refilter the grid.
function Reset() { var _searchTerm = $("#txtCaseId").val(''); var _grid = $("#Grid").data('tGrid'); ClearGridFilterInputs(); _grid.filter("WorkFlowStatus~eq~'Open'");}function ClearGridFilterInputs() { $('#Grid .t-filter-options') .find('input[type="text"], select') .val(''); $('#Grid .t-clear-button').click(); $('#Grid .t-filter-button').click();}The grid shows filtered but the Filter Box is empty. Is there any way to get that Fitler box populated for the column I'm refiltering to?