Hi
I have created a method that serverside clears all filters,
foreach (GridColumn column in radGrid.MasterTableView.Columns)
{
column.CurrentFilterFunction = GridKnownFunction.NoFilter;
column.CurrentFilterValue = string.Empty;
}
radGrid.MasterTableView.FilterExpression = string.Empty;
radGrid.MasterTableView.Rebind();
Works as expected, but the checkboxes in the Checklists are not unchecked.
Can I somehow uncheck the Checklists serverside?
(The grid filertype is "Combined")
John
I have created a method that serverside clears all filters,
foreach (GridColumn column in radGrid.MasterTableView.Columns)
{
column.CurrentFilterFunction = GridKnownFunction.NoFilter;
column.CurrentFilterValue = string.Empty;
}
radGrid.MasterTableView.FilterExpression = string.Empty;
radGrid.MasterTableView.Rebind();
Works as expected, but the checkboxes in the Checklists are not unchecked.
Can I somehow uncheck the Checklists serverside?
(The grid filertype is "Combined")
Regards
John
5 Answers, 1 is accepted
0
Accepted
Hi John,
There is currently a bug with the clearing of the selected items when CheckList filtering is used. You can take a look at the logged item in our Ideas & Feedback Portal:
Nevertheless, you can refer to the attached sample page, where you will see how you can manually clear the checked values with the CheckList Filtering.
Hope this helps.
Regards,
Konstantin Dikov
Telerik
There is currently a bug with the clearing of the selected items when CheckList filtering is used. You can take a look at the logged item in our Ideas & Feedback Portal:
Nevertheless, you can refer to the attached sample page, where you will see how you can manually clear the checked values with the CheckList Filtering.
Hope this helps.
Regards,
Konstantin Dikov
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Peter
Top achievements
Rank 1
answered on 27 Apr 2015, 05:04 AM
Is this fixed yet?
0
Peter
Top achievements
Rank 1
answered on 27 Apr 2015, 05:11 AM
The sample JavaScript didn't work - I tried with both the hard-coded name of the Grid AND with the Client ID version of the Grid and the checkboxes remained clicked.
0
Peter
Top achievements
Rank 1
answered on 27 Apr 2015, 05:14 AM
Interestingly, the JavaScript never fires in the Code Block!
<
CommandItemTemplate
>
<
div
style
=
"padding: 5px 5px;"
>
<
div
style
=
"float: right;"
>
<
asp:LinkButton
ID
=
"lbClearFilters"
runat
=
"server"
CommandName
=
"ClearFilters"
OnClick
=
"lbClearFilters_Click"
CausesValidation
=
"false"
OnClientClick
=
"clearCheckboxes"
><
img
style
=
"border:0px;vertical-align:middle;"
alt
=
""
src
=
"/images/filter.gif"
/> Clear filters</
asp:LinkButton
>
</
div
>
</
div
>
</
CommandItemTemplate
>
<telerik:RadCodeBlock ID=
"RadCodeBlock1"
runat=
"server"
>
<script type=
"text/javascript"
>
function
clearCheckboxes(sender, args) {
var
clientState = JSON.parse($find(
"<%# rgRepricingApproval.ClientID %>"
).get_clientState());
clientState.checkListFilterValues = [];
clientState.checkListFilterKeys = [];
$find(
"<%# rgRepricingApproval.ClientID %>"
).set_clientState(JSON.stringify(clientState));
}
</script>
</telerik:RadCodeBlock>
0
Hi Peter,
Since you are using LinkButton control (and not RadButton as in the attached sample project), the handler of the OnClientClick event should be as shown below:
You can refer to the following MSDN article for detailed information:
Regards,
Konstantin Dikov
Telerik
Since you are using LinkButton control (and not RadButton as in the attached sample project), the handler of the OnClientClick event should be as shown below:
<
asp:LinkButton
runat
=
"server"
OnClientClick
=
"clearCheckboxes()"
......>....</
asp:LinkButton
>
You can refer to the following MSDN article for detailed information:
Regards,
Konstantin Dikov
Telerik
See What's Next in App Development. Register for TelerikNEXT.