$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
GridView Filtering Expression in ASP.NET AJAX
Home > How to > Grid Filtering Expression

Filter expression

KAX.Grid provide nearly all commonly used filter functions to users. Users can only filter data in one column by only setting the filter expression in this column header's filter toolbar. Besides, users can also define multiple filter conditions in multiple columns. After your defining, the javascript will call the events in the web grid view control side by ajax. All the filter and search function will be done in the server side by asp.net data gridview control.
  • Contains: data column value LIKE "%value%"
  • DoesNotContain: data column value NOT LIKE "%value%"
  • StartsWith: data column value LIKE "value%"
  • EndsWith: data column value LIKE "%value"
  • EqualTo: data column value = "value"
  • NotEqualTo: data column value != "value"
  • GreaterThan: data column value > "value"
  • LessThan: data column value < "value"
  • GreaterThanOrEqualTo: data column value >= "value"
  • LessThanOrEqualTo: data column value <= "value"
  • Between: "value1" <= data column value <= "value2". (value1 and value2 should be separated by "space" when input in filter box. And value1 <= value2)
  • NotBetween: data column value <= "value1" or data column value >= "value2". (value1 and value2 should be separated by "space" when input in filter box. And value1 < value2)
  • IsEmpty: data column value = ""
  • NotIsEmpty: data column value != ""
  • IsNull: data column value is null values
  • NotIsNull: data column value is not null values
  • NoFilter: when use this expression, filter controls will be cleared.
Here we provide a example with StartsWith filter for you. Simple C# sample codes are list, this demo code shows only add one filter condition to the asp.net gridview. If you want to do multiple filter operation, it's similar to the single filter.

FilterExpression filter = new FilterExpression();
filter.PropertyName = "ProductName";
filter.Operator = FilterOperator.StartsWith;
filter.Value = "Ch";
filter.IsFilterEditor = true;

set grid filter expression feature in asp.net ajax using c#