Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1010
Rendered event fired on filter
posted

On an igTreeGrid, I'm noticing that the rendered event is continuously fired, and I get a max stack call exceeded error if I programmatically set the filter in the event handler. If I comment the set filter code the rendered event is triggered only once. 

var renderedHandler = function(event, ui) {

       var customFilters = @(Html.Raw(Json.Encode(Model.Filter.CustomFilters)));
       if (customFilters != null && customFilters != "") {
           $("#grid").igTreeGridFiltering('filter', (customFilters));
       }

}

My customFilters is - [{ fieldName: 'Location', expr: 'dfw', cond: 'contains' }, { fieldName: 'Market', expr: 'z17', cond: 'contains' }]

For test purpose, I tried explicitly setting the filter on a button click event after the grid is loaded, and it works. 

Just FYI - The grid is created on a table and not a div tag. 

What is the recommended way to apply the filter ??