True DBGrid for WinForms | ComponentOne
Customization / Custom Glyphs
In This Topic
    Custom Glyphs
    In This Topic

    TrueDBGrid lets you change the default glyph images used in the grid to indicate various actions such as column filtering and sorting. To do so, you can use the GridGlyphs class which is a collection of images used by the grid to represent filtered state, sorting order, checkbox states, and so on. These images can be accessed through Glyphs property of the C1TrueDBGrid class which accepts values from GlyphType enumeration.

    The following image showcases customized glyphs in TrueDBGrid.

    custom glyphs

    To change the default glyphs used for filter editor, sort indicator, and checkbox (unchecked state) in TrueDBGrid, use the Glyphs property as demonstrated in the following code.

    C#
    Copy Code
    c1TruedbGrid1.Glyphs[GlyphType.FilterEditor] = Image.FromFile("filtereditor.png");
    c1TruedbGrid1.Glyphs[GlyphType.SortDescending] = Image.FromFile("sortDesc.png");
    c1TruedbGrid1.Glyphs[GlyphType.CheckBoxUnchecked] = Image.FromFile("unchecked.png");
    

    Similarly, you can change default glyphs for filtered columns, current row, header row, as well as different states of checkboxes and sort indicators using the Glyphs property.