FilterValue.CreateShowNonBlanksValue(GridViewDataColumn, String) Method
Creates and returns the (Non blanks) filter item used to filter a column by non blank values.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.1.dll
NuGet Package: DevExpress.Web
Declaration
public static FilterValue CreateShowNonBlanksValue(
GridViewDataColumn column,
string text
)
Parameters
Name | Type | Description |
---|---|---|
column | GridViewDataColumn | A GridViewDataColumn object that is the data column. |
text | String | A String value that specifies the item’s display text. |
Returns
Type | Description |
---|---|
FilterValue | Returns the filter item used to filter by non blank values. |
Remarks
When creating custom header filter values by handling the ASPxGridView.HeaderFilterFillItems event, you can use the CreateShowNonBlanksValue method to create the (Non blanks) filter item. Then, the created item can be added to the header filter item list using the ASPxGridHeaderFilterEventArgs.Values.Add method.
Example
using DevExpress.Web.ASPxGridView;
...
protected void ASPxGridView1_HeaderFilterFillItems(object sender, DevExpress.Web.ASPxGridViewHeaderFilterEventArgs e) {
e.Values.Clear();
FilterValue showAllItem = FilterValue.CreateShowAllValue("Show All");
e.Values.Add(showAllItem);
FilterValue showBlanksItem = FilterValue.CreateShowBlanksValue(e.Column, "Show Blanks");
e.Values.Add(showBlanksItem);
FilterValue showNonBlanksItem = FilterValue.CreateShowNonBlanksValue(e.Column, "Show non Blanks");
e.Values.Add(showNonBlanksItem);
...
}
See Also