39e61ecc71da79f9bbc44d6348754d4c97e8c1df
FAQ/ProcessEqualsSelectList.md
| ... | ... | @@ -0,0 +1,24 @@ |
| 1 | +#The ProcessEqualsSelectList() Method |
|
| 2 | + |
|
| 3 | +This code sample overrides the equals select drop-down used in the "Filter" tab and in the Report Viewer. |
|
| 4 | + |
|
| 5 | +Here is sample code that you can add to your global file: |
|
| 6 | + |
|
| 7 | +```csharp |
|
| 8 | +public override string[] ProcessEqualsSelectList(Izenda.AdHoc.Database.Column column) |
|
| 9 | +{ |
|
| 10 | + //look for a particular column name |
|
| 11 | + if (column.Name == "VendorName") |
|
| 12 | + { |
|
| 13 | + ArrayList filteredValues = new ArrayList(); |
|
| 14 | + filteredValues.Add("Vendor 1"); |
|
| 15 | + filteredValues.Add("Vendor 2"); |
|
| 16 | + |
|
| 17 | + //return custom list of values instead of full list |
|
| 18 | + return (string[])filteredValues.ToArray(typeof(string)); |
|
| 19 | + } |
|
| 20 | + |
|
| 21 | + // return base if custom array is not created |
|
| 22 | + return base.ProcessEqualsSelectList(column); |
|
| 23 | +} |
|
| 24 | +``` |
|
| ... | ... | \ No newline at end of file |
ProcessEqualsSelectList.md
| ... | ... | @@ -1,24 +0,0 @@ |
| 1 | -#The ProcessEqualsSelectList() Method |
|
| 2 | - |
|
| 3 | -This code sample overrides the equals select drop-down used in the "Filter" tab and in the Report Viewer. |
|
| 4 | - |
|
| 5 | -Here is sample code that you can add to your global file: |
|
| 6 | - |
|
| 7 | -```csharp |
|
| 8 | -public override string[] ProcessEqualsSelectList(Izenda.AdHoc.Database.Column column) |
|
| 9 | -{ |
|
| 10 | - //look for a particular column name |
|
| 11 | - if (column.Name == "VendorName") |
|
| 12 | - { |
|
| 13 | - ArrayList filteredValues = new ArrayList(); |
|
| 14 | - filteredValues.Add("Vendor 1"); |
|
| 15 | - filteredValues.Add("Vendor 2"); |
|
| 16 | - |
|
| 17 | - //return custom list of values instead of full list |
|
| 18 | - return (string[])filteredValues.ToArray(typeof(string)); |
|
| 19 | - } |
|
| 20 | - |
|
| 21 | - // return base if custom array is not created |
|
| 22 | - return base.ProcessEqualsSelectList(column); |
|
| 23 | -} |
|
| 24 | -``` |
|
| ... | ... | \ No newline at end of file |