ASP.NET Grid - Validating Filter Fields

ORDER ID
NAME
CITY
POSTAL CODE
COUNTRY
 
 
 
 
 
 
 
 
 
 
 
 
10248
Vins et alcools Chevalier
poipopo
51100
France
10249
Toms Spezialitten
Mnster
440874
France
10250
Hanari Carnes
Rio de Janeiro
05454-876
Brazil
10251
Victuailles en stock
Lyon
69004
France
10252
Suprêmes délices
Charleroi
B-6000
Belgium
10253
Hanari Carnes
Rio de Janeiro
05454-876
Brazil
10254
Chop-suey Chinese
Bern2
3012
Switzerland
10255
Richter Supermarkt
Genève
1204
Switzerland
10256
Wellington Importadora
Resende
08737-363
Brazil
10257
HILARIÓN-Abastos
San Cristóbal
5022
Venezuela
 
 
 
 
Records per page:
1
|
2
|
3
Records: 1 - 10 of 25 - Pages: 

You can use the OnFiltering client-side event of the Grid to perform validations before filtering the Grid.
In the event handler of this event you have access to the selected filter option, the current filter controls and filter values for each column.

In this example, the "ShipName" and "ShipCountry" columns are validated - if you select a filter option different than "No filter"
you need to specify a value in the filter fields of those columns, otherwise you'll get a pop-up error message.



« Back to examples