Sam
Sam

Reputation: 45

Customizing filter dropdown

I'm a newbie to DevExpress controls.

I've a boolean column(called "Valid") that is being shown in a DevExrpress GridContol in my C#/WPF application.

When I click on the "key" icon on this column header,I see a dropdown with 4 choices namely: (Blanks),(Non Blanks), (Checked) and (Un Checked).

I dont want this dropdown to show (Blanks) and (Non Blanks) choices.Only (Checked) and (Un Checked) choices should appear.

Wondering if this is achievable at all?

Thanks.

Upvotes: 2

Views: 108

Answers (1)

Shivani Katukota
Shivani Katukota

Reputation: 859

Use the CustomFilterPopupItems event to remove Blanks and Non Blanks option from the filter.

private void pivotGridControl1_CustomFilterPopupItems(object sender, DevExpress.XtraPivotGrid.PivotCustomFilterPopupItemsEventArgs e) {
            e.ShowBlanksItem.IsVisible = false;
        }

Upvotes: 2

Related Questions