Example of Sorting and Filtering in ASP.NET MVC Spreadsheet Control
This sample demonstrates sorting and filtering feature using employee details.
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | AA | AB | AC | AD | AE | AF | AG | AH | AI | AJ | AK | AL | AM | AN | AO | AP | AQ | AR | AS | AT | AU | AV | AW | AX | AY |
---|
3 |
26 |
29 |
49 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
EmployeeID | EmployeeName | Gender | Department | DateOfJoining | Salary | City | ||||||||||||||||||||||||||||||||||||||||||||
5648843 | Ailsun Porker | Female | Services | 11/23/2016 | $46,533.06 | Mayisyan | ||||||||||||||||||||||||||||||||||||||||||||
5918336 | Aloysius Blunden | Male | Services | 6/16/2010 | $23,992.84 | Italó | ||||||||||||||||||||||||||||||||||||||||||||
7239057 | Bruce Pook | Male | Services | 8/15/2019 | $46,169.78 | Drawsko | ||||||||||||||||||||||||||||||||||||||||||||
5210163 | Helene Borsay | Female | Services | 1/19/2018 | $34,017.42 | Chengkan | ||||||||||||||||||||||||||||||||||||||||||||
3536836 | Justus Eilert | Male | Services | 8/30/2016 | $25,054.73 | Kitamilo | ||||||||||||||||||||||||||||||||||||||||||||
9189124 | Valerye Russell | Female | Services | 7/17/2012 | $32,651.96 | Pichilemu | ||||||||||||||||||||||||||||||||||||||||||||
In this demo, sorting is applied to B(Employee Name) column in ascending order using sort
method.
The sort order can be specified in order
property with following values `Ascending` or `Descending` and its
default value is `Ascending`.
The sorted data is filtered with value 'Services' in `D` column using
applyFilteropens in a new tab
method in call back function of
sortopens in a new tab
method.
More information about sorting and filtering feature can be found in this documentation opens in a new tab section.