This topic is locked

Hide filter for some users

9/23/2019 3:58:32 PM
ASPRunner.NET General questions
T
Tim author

Hello,
I would like to hide some filter options for a certain group of users. My first step is to see if I can hide the filter for everyone. On the "Before display" event of the list page I added:
pageObject.hideItem("filter_panel_field");
I got that code from "?" for the item id field on the designer page. But this doesn't seem to work.
Is there a way to hide certain filters?
Thanks,

Tim

admin 9/24/2019

This seems to be a bug, we are looking into this. As a workaround, you can use the following in BeforeDisplay event:

xt.assign(""filter_control_ProductID"", false);


Replace ProductID with your field name.

T
Tim author 10/3/2019

It looks like this is still an issue in the latest build of 10.3, but the workaround is working fine.
Thanks,

Tim

admin 10/3/2019

We will fix it eventually, not a quick fix, unfortunately. The filter panel is built as a whole and accessing individual filters requires some extra work, even if you see ItemID of individual filter fields in Page Designer.