e8b8b7c888dcabaa2bfd9fd1dbff4d3451e95752
FAQ/Customizing-Report-Viewer-Filter-Order.md
| ... | ... | @@ -0,0 +1,19 @@ |
| 1 | +##How do I customize the report viewer filter order? |
|
| 2 | + |
|
| 3 | +Currently there is no API way to arrange the filters. They by default are in selected order. |
|
| 4 | + |
|
| 5 | +The easiest way for such customization is to change |
|
| 6 | + |
|
| 7 | +``RefreshFilters(returnObj)`` |
|
| 8 | + |
|
| 9 | +function in the Resources\js\ReportViewerFilters.js file. |
|
| 10 | +The hook is here: |
|
| 11 | + |
|
| 12 | +`var filterContent = GetFilterContent(returnObj.Filters, index, divsId, hasFilterLogic, false);` |
|
| 13 | +`htmlFilters.find('.filtersContent').append(filterContent);` |
|
| 14 | + |
|
| 15 | +filterContent is a filter control, htmlFilters.find('.filtersContent') is a holder for all filters. |
|
| 16 | + |
|
| 17 | +You can generate controls for all filters, put them in some additional elements (for example put 'Send Start Date' and 'Send End Date' filters in a `<div>` so these filters will always be positioned together) and only then put everything in the '.filtersContent' element. |
|
| 18 | + |
|
| 19 | +There is no one solution that can be used in all cases so you need to create logic that will satisfy your particular needs. |