ComponentOne True DBGrid for WinForms
Cell Editing Techniques / In-Cell Buttons / Customizing the In-Cell Button Bitmap
In This Topic
    Customizing the In-Cell Button Bitmap
    In This Topic

    By default, True DBGrid for WinForms uses a down arrow for the in-cell button.

    However, the button bitmap can be changed for a C1DisplayColumn object at design time by setting the ButtonPicture property in code:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Me.C1TrueDBGrid1.Columns(0).ButtonPicture = System.Drawing.Image.FromFile("dollar.bmp")
    

    To write code in C#

    C#
    Copy Code
    this.c1TrueDBGrid1.Columns[0].ButtonPicture = System.Drawing.Image.FromFile("dollar.bmp");
    

    The grid automatically draws the edges corresponding to the button's up/down states as appropriate, so only the interior image of the button needs to be provided.