Skip to content

Commit 36cafbb

Browse files
docs(grid): filter operators list
1 parent ef95e4e commit 36cafbb

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

components/grid/filtering.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@ The Grid component offers support for filtering.
1414

1515
To enable sorting, set the grid's `Filterable` property to `true`.
1616

17-
The grid will render a row below the column headers with UI that you can use to fill in filter criteria and then you can click a button to execute the filter. Once a filter is a applied to a column, a button will appear that lets you clear that filter.
17+
The grid will render a row below the column headers with UI that you can use to fill in the filter criteria. You can click outside of the filter to execute the default operator, or click a button to choose a different filter operator (like "contains", "greater than" and so on).
1818

19-
The behavior of the filter header will depend on the column data type:
19+
Once a filter is a applied to a column, a button will appear that lets you clear that filter.
2020

21-
* `string` - the filter is `Contains`. A [Telerik TextBox]({%slug components/textbox/overview%}) component is used.
22-
* `number` - the filter is `EqualsTo`. A [Telerik Numeric TextBox]({%slug components/numerictextbox/overview%}) component is used.
23-
* `DateTime` - the filter is `EqualsTo`. A [Telerik Date Input]({%slug components/dateinput/overview%}) component is used.
21+
The behavior of the filter header input and the available filter operators will depend on the column data type. For example, a boolean field will only have the options "is true" and "is false" and will not have operators like "contains" or "greater than".
2422

2523
You can filter more than one column at a time, and all filter rules will be applied together with an `AND` logic.
2624

@@ -34,6 +32,7 @@ You can filter more than one column at a time, and all filter rules will be appl
3432
<TelerikGridColumn Field=@nameof(Employee.Name) />
3533
<TelerikGridColumn Field=@nameof(Employee.AgeInYears) Title="Age" />
3634
<TelerikGridColumn Field=@nameof(Employee.HireDate) Title="Hire Date" />
35+
<TelerikGridColumn Field=@nameof(Employee.IsOnLeave) Title="On Vacation" />
3736
</TelerikGridColumns>
3837
</TelerikGrid>
3938
@@ -51,7 +50,8 @@ You can filter more than one column at a time, and all filter rules will be appl
5150
EmployeeId = i,
5251
Name = "Employee " + i.ToString(),
5352
AgeInYears = rand.Next(10, 80),
54-
HireDate = DateTime.Now.Date.AddDays(rand.Next(-20, 20))
53+
HireDate = DateTime.Now.Date.AddDays(rand.Next(-20, 20)),
54+
IsOnLeave = i % 3 == 0
5555
});
5656
}
5757
}
@@ -62,6 +62,7 @@ You can filter more than one column at a time, and all filter rules will be appl
6262
public string Name { get; set; }
6363
public int? AgeInYears { get; set; }
6464
public DateTime HireDate { get; set; }
65+
public bool IsOnLeave { get; set; }
6566
}
6667
}
6768
````
15 KB
Loading
3.88 KB
Loading

0 commit comments

Comments
 (0)