C1TrueDBGrid -- can I display an ellipsis "..." button in a grid cell?

Posted by: adam.dawes on 5 December 2019, 12:13 pm EST

    • Post Options:
    • Link

    Posted 5 December 2019, 12:13 pm EST - Updated 4 October 2022, 12:26 am EST

    I’d like for some of my WinForms C1TrueDBGrid cells to have an ellipsis (“…”) button displayed on the right side of the cell, so that the user can click this to open a dialog window relating to the cell data.

    I can see that each column has a Button property, but setting this to true causes it to display a drop-down-arrow button, like a ComboBox, rather than an ellipsis.

    Is there any way to achieve what I’m looking to do?

    The attached image shows the kind of thing I want, this is taken from a Properties grid.

    Thanks in advance!

  • Posted 6 December 2019, 3:14 am EST

    Hello,

    When setting the Button property of DisplayColumns to true, the default button that appears is a drop-down arrow button but you can change that icon by using ButtonPicture property of C1DataColumn class as given in code snippet below :

    c1TrueDBGrid1.Columns[2].ButtonPicture = Image.FromFile(@"..\..\button.png");
    
    

    You can handle that button click in the ButtonClick event of TrueDBGrid.

    Please go through the attached sample demonstrating the same.

    Regards,

    Prabhat Sharma.

    TDBButtonDemo.zip

  • Posted 6 December 2019, 3:17 am EST

    Ah OK, thanks. I’d hoped I could set the button caption as text rather than having to provide a picture but if that’s the only way then I guess it’ll work!

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels