How to Filter a GridViewCommandColumn
Environment
Product Version | Product | Author |
---|---|---|
2022.1.222 | RadGridView for WinForms | Desislava Yordanova |
Description
GridViewCommandColumn is not purposed to provide filtering as its data cells are expected to offer a button element, not a text value. This tutorial will demonstrate a sample approach how to provide such a filtering functionality.
Solution
A possible solution is to use a GridViewTextBoxColumn and construct a custom cell element for its data cells that contain a button. Thus, the filtering functionality will be allowed out of the box considering the text value of each cell.
You can find below a sample code snippet for your reference. Let's consider that the RadGridView control is bound to the Northwind.Products table: