Examples
- 6 minutes to read
Binding to Data
- How to: Bind a Grid to Data (Various Sources and Techniques)
- How to: Bind the GridControl to Dynamic Data
- How to: Bind to Microsoft Access Database
- How to: Display Data from an XML File
- How to: Synchronize the WPF Data Grid with the ICollectionView
- How to: Generate Columns for All Fields in a Data Source
- How to: Customize Automatically Generated Columns
- How to: Apply Data Annotations
- How to: Display Unbound Data
- How to: Parallelize Data-Intensive Operations On In-Memory Data in Instant Feedback UI Mode
- How to: Update Data in a Separate Thread
- How to: Implement CRUD Operations in a Data-Bound Grid
MVVM Enhancements
- How to: Bind the Grid to a Collection of Columns
- How to: Bind the Grid to Bands Specified in ViewModel
- How to: Bind the Grid to Total and Group Summaries
- How to: Show Node Summaries Based on a Source Collection
- How to: Bind the Grid to a Collection of Conditional Formatting Rules
- How to: Bind the GridControl’s Selected Rows to a Collection in a ViewModel
- How to: Pass Filtered Data to the ViewModel
Master-Detail
- How to: Create a Master-Detail Grid
- How to: Create a Master-Detail Grid in Code
- How to: Bind Master and Detail Focused Rows to View Model Properties
- How to: Define the Selected Detail Row in the View Model
- How to: Display Detail Content in Tabs
- How to: Display Chart Control in Grid Details
- How to: Display Custom Content in Grid Details
- How to: Display Different Details Based on Master Row Data
- How to: Expand and Collapse Master Rows
- How to: Specify Detail Buttons Visibility
Hierarchical Data Presentation
- How to: Bind to Self-Referential Data Structure
- How to: Implement the Child Nodes Path
- How to: Use the Child Nodes Selector to Display Hierarchical Data
- How to: Load Nodes Asynchronously Without Locking the Application’s UI
- How to: Use Hierarchical Data Templates to Build a Tree
- How to: Create an Unbound Tree
- How to: Load Nodes Dynamically
- How to: Iterate Through Nodes With the TreeListNodeIterator
Sorting, Grouping, and Filtering
- How to: Use Custom Rules to Sort Data
- How to: Sort Group Rows by Summary Values
- How to: Apply Custom Rules to Group Rows
- How to: Forbid Expand and Collapse Operations for Group Rows
- How to: Apply a Custom Filter Condition
- How to: Specify Row Visibility in the ViewModel
- How to: Customize Filter Items in a Column’s Drop-Down Filter
- How to: Create a UI to Filter Grid Data
- How to: Filter Columns Bound to Collection Properties
Calculate Summaries
- How to: Display Total Summaries
- How to: Display Group Summaries
- How to: Summarize Empty Cells
- How to: Calculate Custom Node Summaries in TreeListView
- How to: Bind the Grid to Total and Group Summaries
- How to: Customize Individual Total and Group Summaries
Edit and Validate Data
- How to: Implement CRUD Operations in a Data-Bound Grid
- How to: Build Binding Paths in WPF Data Grid Cells
- How to: Build Binding Paths in WPF Data Grid Rows
- How to: Add and Remove Rows in Code
- How to: Initialize the New Item Row with Default Values
- How to: Initialize a New Row when the Editor is Shown
- How to: Add Image and Button Columns
- How to: Assign a ComboBox Editor to a Column
- How to: Specify Navigation in Custom Cell Editors
- How to: Embed RichTextBox in Grid Cells
- How to: Disable Rows Based on Their Values
- How to: Use Custom Editors to Edit Cell Values
- How to: Immediately Post New Cell Values
- How to: Validate Data Rows and Indicate Errors
- How to: Validate Cell Editors
- How to: Implement an Edit Cell Confirmation
- How to: Implement Attribute-Based Validation
- How to: Display Custom Text within Data Cells
Focus and Navigation
- How to: Focus a Cell with the Specified Value
- How to: Select Rows that Contain a Specific Value
- How to: Obtain Rows Visible on Screen
- How to: Implement Data Paging
- How to: Implement Custom Scroll Animation for Per-Pixel Scrolling
- How to Handle Row Double-clicks
- How to Handle a Double-click on a Grid Row in an MVVM Application
Drag-and-Drop
- How to: Implement Drag-and-Drop Between the GridControl and the ListBoxEdit
- How to: Implement Drag-and-Drop Between GridControls
- How to: Implement Drag-and-Drop Between the GridControl and Other Controls
- How to: Customize Drop Marker
- How to: Manually Control Drag-and-Drop
Styles and Templates
- How to: Show Hyperlinks in Grid Cells
- How to: Wrap Text Inside Columns
- How to: Customize Column Headers Based on Their Location
- How to: Display an Image within a Column Header
- How to: Display a Check Box in Column Headers
- How to: Define a CellStyle and CellTemplate in Code Behind
- How to: Create a Custom Filter Dropdown
- How to: Change the Appearance of Focused Rows and Cells
- How to: Change the Appearance of Focused and Selected Rows
- How to: Change the Appearance of Focused and Selected Cells
- How to: Change a Cell Template Based on Custom Logic
- How to: Select Row Templates Based on Custom Logic
- How to: Display an Icon in an Unbound Column Based on the Value in a Bound Column
Conditional Formatting
- How to: Apply Conditional Formatting
- How to: Apply Conditional Formatting in Code-Behind
- How to: Apply Conditional Formatting Rules Specified in a ViewModel
- How to: Change Background Color for Modified Cells
End-User Interaction
- How to: Create an Event Raised on Layout Changes
- How to: Automatically Resize Grid Columns Based on Their Content
- How to: Display a Context Menu for Data Cells
- How to: Add and Remove Items from the Context Menu
- How to: Display Text in a Grid With No Records
- How to: Display a Standalone Column Chooser
- How to: Specify Custom Content for Headers Displayed in the Column Chooser
Print and Export
- How to: Print and Export the Grid
- How to: Customize the Appearance of Printed/Exported Information
- How to: Add Page Headers and Footers to Exported Data
- How to: Export the GridControl to a Native Excel Table