Guides/Show/Guides/Show_Hide-Fields-in-Filters.md
... ...
@@ -1,42 +0,0 @@
1
-#Show/Hide Fields in Filters
2
-
3
-[[_TOC_]]
4
-
5
-##Purpose
6
-
7
-Hiding fields in filters is a way to disallow filtering on certain fields. You can programmatically prevent access to fields in the filters tab based on any arbitrary logic you wish to employ. You can also adjust the logic to show specific fields.
8
-
9
-##Example
10
-Here are the available fields before hiding any:
11
-
12
-![Before Hiding Fields](http://wiki.izenda.us/Guides/Developer-Links-and-Guides/not-hidden.png)
13
-
14
-And here are the available fields after hiding all that contain the word "Ship":
15
-
16
-![Hidden Fields](http://wiki.izenda.us/Guides/Developer-Links-and-Guides/hidingfilters.png)
17
-
18
-In this example, I'm arbitrarily disallowing the user to filter on any field with the word "Ship" in it.
19
-
20
-##Implementation
21
-
22
-There is a rather simple override to implement this functionality in your Global.asax. The function is IsFieldAllowedInFilters and has the following signature.
23
-
24
-```csharp
25
-public override bool IsFieldAllowedInFilters(string fullColumnName, string tableName, string columnName) {
26
- base.IsFieldAllowedInFilters(fullColumnName, tableName, columnName);
27
- }
28
-```
29
-
30
-Here is the override used to achieve the results in the Example section:
31
-
32
-```csharp
33
-public override bool IsFieldAllowedInFilters(string fullColumnName, string tableName, string columnName) {
34
- if (columnName.Contains("Ship")) {
35
- return false;
36
- }
37
- else
38
- return true;
39
- }
40
-```
41
-
42
-Your logic can be easily amended to target individual columns, or even entire tables worth of columns.
... ...
\ No newline at end of file
Guides/Show_Hide-Fields-in-Filters.md
... ...
@@ -0,0 +1,42 @@
1
+#Show/Hide Fields in Filters
2
+
3
+[[_TOC_]]
4
+
5
+##Purpose
6
+
7
+Hiding fields in filters is a way to disallow filtering on certain fields. You can programmatically prevent access to fields in the filters tab based on any arbitrary logic you wish to employ. You can also adjust the logic to show specific fields.
8
+
9
+##Example
10
+Here are the available fields before hiding any:
11
+
12
+![Before Hiding Fields](http://wiki.izenda.us/Guides/Developer-Links-and-Guides/not-hidden.png)
13
+
14
+And here are the available fields after hiding all that contain the word "Ship":
15
+
16
+![Hidden Fields](http://wiki.izenda.us/Guides/Developer-Links-and-Guides/hidingfilters.png)
17
+
18
+In this example, I'm arbitrarily disallowing the user to filter on any field with the word "Ship" in it.
19
+
20
+##Implementation
21
+
22
+There is a rather simple override to implement this functionality in your Global.asax. The function is IsFieldAllowedInFilters and has the following signature.
23
+
24
+```csharp
25
+public override bool IsFieldAllowedInFilters(string fullColumnName, string tableName, string columnName) {
26
+ base.IsFieldAllowedInFilters(fullColumnName, tableName, columnName);
27
+ }
28
+```
29
+
30
+Here is the override used to achieve the results in the Example section:
31
+
32
+```csharp
33
+public override bool IsFieldAllowedInFilters(string fullColumnName, string tableName, string columnName) {
34
+ if (columnName.Contains("Ship")) {
35
+ return false;
36
+ }
37
+ else
38
+ return true;
39
+ }
40
+```
41
+
42
+Your logic can be easily amended to target individual columns, or even entire tables worth of columns.
... ...
\ No newline at end of file