We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

GDBD question: How to add a button in a text cell?

I have a GDBD boound to a dataTable. Based on the user input, I need to inser a button for all the cells with ColIndex == 1. I try to implement this functionality in method gridModel_QueryCellInfo(). I realized that if I use e.Style.CellType = "PushButton"; the whole cell will become a button type, the text is missing. I also read the sample of EllipsisCell.cs, but this one needs to create a .bmp file. Is there any simple way to insert a button into a text cell?

1 Reply

AD Administrator Syncfusion Team April 7, 2005 10:06 PM UTC

You can derive the GridStaticCellModel/GridStaticCellRenderer classes and add a button to your derived class. If you want it editable, derive GridTextBoxCellModel/Renderer instead of the Static cell. Here is a sample. http://www.syncfusion.com/Support/user/uploads/GC_test_5a8ae6f3.zip

Live Chat Icon For mobile
Up arrow icon