Skip to content

DevExpress-Examples/winforms-grid-custom-button-in-column-header

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WinForms Data Grid - How to display a custom button within a column header

This example demonstrates how to "create" and display a custom button within a column header.

The CustomDrawColumnHeader event is handled to draw a clickable region within the column header.

void OnCustomDrawColumnHeader(object sender, ColumnHeaderCustomDrawEventArgs e) {
    if(e.Column == null) return;
    DefaultDrawColumnHeader(e);
    DrawCustomButton(e);
    e.Handled = true;
}

Files to Review

Documentation

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)