Throughout this section of the documentation you will find fully functional code snippets that demonstrate a variety of features used in real-life scenarios.
- Editing Data
- Entering edit when a cell is current
- Using a masked text box
- Handling routed edit events
- Defining foreign key configurations
- Custom key/value mappings
- Filtering Data Items
- Filtering data items (Filter event)
- Enabling automatic filtering
- Providing a new auto-filter control style
- Creating external auto-filter controls
- Providing custom distinct values
- Using a filter row
- Providing default filter criteria
- Enabling and disabling advanced filtering
- Applying a style to localize the operators
- Grouping Data items
- Grouping data items
- Preventing grouping and sorting
- Defining a default group configuration
- Programmatically toggling group expansion
- Custom grouping
- Changing the group-header text
- Providing a group-configuration selector
- Creating a group-configuration selector
- Providing, Inserting, and Removing Data
- Binding to a data table
- Binding to an array
- Retrieving values from the current item
- Initializing an insertion row
- Providing unbound data
- Binding to a LINQ query (SQL)
- Binding to a LINQ query (XML)
- Binding to a master/detail data table
- Defining detail descriptions
- Manually handling the insertion process
- Deleting selected items
- Providing unbound data (DataGridUnboundItemProperty)
- Binding to an IQueryable source
- Sorting Data Items
- Sorting data items
- Preventing sorting and grouping
- Custom sorting
- Handling collection-changed events
- Providing a custom sort comparer
- Validating Data
- Providing a cell error style
- Providing binding-level validation
- Providing UI-level validation
- Using Statistical Functions
- Displaying statistical functions
- Changing statistical contexts
- Custom statistical-result layout
- Displaying statistical functions in details
- Custom statistical function
- Customizing Views and Themes
- Setting a view and theme through attribute syntax
- Setting a view and theme through property element syntax
- Displaying a scroll tip
- Enabling the column chooser
- Customizing Cardflow 3D Views
- Providing surface configurations
- Providing an empty-surface brush
- Applying a grid background brush
- Applying a card background brush
- Coercing a surface configuration
- Customizing Card Views
- Adding an InsertionRow to the fixed headers
- Clearing a fixed header section
- Changing the main (primary column)
- Adding separator lines
- Recreating the default card-view header
- Applying a grid background brush
- Applying a card background brush
- Customizing Table Views
- Adding an InsertionRow to the fixed headers
- Clearing a fixed header section
- Adding vertical and horizontal grid lines
- Hiding the group-level indicator pane
- Hiding the row-selector pane
- Fixing columns
- Allowing horizontal scrolling
- Using routed view properties
- Stretching columns
- Applying a grid background brush
- Customizing Multi-surface Themes
- Providing surface configurations
- Providing a default region configuration
- Defining region configurations
- Setting a multi-surface theme
- Changing a title-region position
- Providing new gradient colors
- Creating a custom surface configuration and multi-surface theme
- Creating Custom Cell Editors
- Providing a simple cell editor
- Providing a complex cell editor
- Providing a default cell editor
- Styling Elements
- Styling data cells
- Styling data cells through triggers
- Alternating data-row styles
- Styling a fixed-column splitter
- Changing the background color of a data row
- Forcing items in the fixed headers to occupy all the available width
- Styling row selectors
- Providing a detail configuration item-container style
- Changing the no-group content
- Centering column titles
- Applying a card background brush
- Templating Elements
- Providing a cell-content template
- Providing a group-header control template
- Providing a data cell template
- Providing a data row template for table view types
- Providing a data row template for card view types
- Providing an insertion row template
- Formatting a cell's content
- Changing the group-header text
- Creating a Value-changed Handler
- Defining Unbound Columns
- Handling Collection-changed Events
- Persisting Settings
- Persisting and loading settings using an XmlSerializer
- Persisting and loading settings through the application settings
- Printing and Exporting
- Configuring a print view
- Configuring a progress window
- Styling a page
- Exporting to Excel (ExcelExporter class)
- Exporting to Excel (ExportToExcel method)
- Changing the group-header formats
- Receiving notifications when the selected item(s) changes
- Retrieving a DataRow from a DataItem
- Retrieving a Parent Group
- Retrieving a Reference to an Item in a Header or Footer Section
- Retrieving the value of the content of a cell through its data source item
- Selecting all Data Items in a Group
- Subscribing to the Events of an Element
Because creating a custom surface configuration and multi-surface theme requires more than a code snippet to demonstrate, links to the required classes are provided below: