[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Collapse]Data Grid
   [Expand]Get Started With Data Grid and Views
   [Expand]Data Binding
    Unbound Columns
   [Expand]Data Editing and Validation
   [Expand]Filter and Search
   [Expand]Focus and Selection Handling
    Format Cell Values
   [Expand]Master-Detail Relationships
   [Expand]Asynchronous Image Load
   [Expand]Export and Printing
   [Expand]Appearance and Conditional Formatting
    Split Presentation
    Row Preview Sections
   [Expand]Batch Modifications
    Hit Information
    Popup Menus
   [Expand]Save and Restore Layout
   [Expand]Visual Elements
   [Expand]Design-Time Features
    [Expand]Conditional Formatting
    [Expand]Data Binding
    [Expand]Data Editing
    [Expand]Data Presentation
    [Expand]Export and Printing
      Examples: Filtering Records
      How to: Apply a Filter to a Column
      How to: Apply a Filter to a View
      How to: Customize the Checked Filter Dropdown List
      How to: Display a Custom String in the Filter Panel when a View's Data is not Filtered
      How to: Dynamically Control Record Visibility in XtraGrid
      How to: Filter Columns that Display RTF Data
      How to: Perform Custom Filtering When the (Custom) Item is Selected in the Filter Dropdown
      How to: Specify a Filter for a View Without Binding It to Any Particular Column
    [Expand]General Use
    [Expand]Layout View
    [Expand]Navigation and Selection
    [Expand]Skins and Look and Feel
    [Expand]Sorting and Grouping
   [Expand]End-User Capabilities
    Included Components
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

How to: Filter Columns that Display RTF Data

In this example, a GridControl contains a Description column that displays RTF data in its cells (using an RichTextBox in-place editor).

By default, when displaying the column's filter dropdown list, this list will contain RTF text, including RTF specifiers, making the text human-unreadable.This issue can be resolved as shown in the example.A helper unbound column is created that will be used as a substitute when the filtering functionality is invoked for the Description column.

The unbound column's values will be the Description column's values converted to simple text.

When an end-user invokes a filter dropdown list for the Description column, the list will actually display values of the created unbound column.Here are the steps to implement this approach:1) A new unbound column (field name:"SimpleText") is created. This column is hidden by setting its Visible and ShowInCustomizationForm properties to false.

2) The SimpleText column's caption is set to the same value as for the Description column, so a user will not notice data replacement.

3) The UnboundColumnData event is handled to populate the SimpleText column with data. The column's values will be the Description column's values converted to simple text.

4) The Description column's FieldNameSortGroup property is set to the unbound column's field name ("SimpleText"). This forces the grid to use values of the SimpleText column when sorting/grouping/filtering is applied to the Description column.

5) Set the Description column's OptionsFilter.FilterBySortField property to DevExpress.Utils.DefaultBoolean.True

Is this topic helpful?​​​​​​​