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
355
igGrid Sorting not working properly
posted

I am using igGrid MVC helper in my project with single-column sorting enabled (local). I also have a checkbox to filter the results and rebind the grid later.

I rebind the grid in Javascript after the results are filtered (not actually filtering the results in the sample project); after filtering the results the sorting seems to stop working correctly. I am attaching the sample project to demonstrate the issue. To recreate the problem, follow the steps

- Run the project; the grid is sorted in ascending direction by "Message" field when it is loaded the first time. - Sort by "Start Date" field now. - Next, check the "Filter" button (at this time the grid is rebinded in Javascript). - Sort by "Error Message" column, - finally uncheck the "Filter" checkbox.

There are now two sort indicators ("Start Date" and "Error Message"), even though it is just sorting on "Error Message" field. Is there a way to clear the indicator on checkbox click event or eliminate the issue all together?