How do I display a button or image in one of the columns of GridGroupingControl (Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl). I am trying to handle the click event of this new control/s.
Please could someone tell me how to go about doing this.
Thanks,
Vinay
AD
Administrator
Syncfusion Team
July 26, 2004 10:49 AM UTC
Hi Vinay,
to display a image you can set the cell type for the column to be "Image".
Example:
this.groupingGrid1.TableDescriptor.Columns["Column Name"].Appearance.AnyRecordFieldCell.CellType = "Image";
If you do want to display a pushbutton you could instead set the cell type to "PushButton". However, in order to display text in a pushbutton you will also need to override TableControlPrepareViewStyleInfo and assign e.Inner.Style.Description = e.Inner.Style.Text.
If you want a more customized cell type, e.g. similar to a Ellipsisbutton as shown in "Grid\Samples\CellButtons" example, you can create a custom cell type and register it with the grid. I can create a sample for that if this is the kind of solution you are interested in.
Let me know if you need more help.
Thanks,
Stefan
EH
Erik Huynh
March 14, 2005 05:23 PM UTC
Yes. I did create the Image Appearance of the Cell and set CellType="Image" However, My column is a True/False column, so I set CellValueType is System.Boolean. Now it displays blank in my Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl
How can I display my own Image depending on the value of the cell (For ex: a "Checked" image for TRUE value and an "Unchecked" image for the FALSE value.
Please help ASAP. My company bought your software a month ago.
Thanks a lot.
AD
Administrator
Syncfusion Team
March 14, 2005 07:17 PM UTC
You can handle the TableControlCellDrawn event and draw a bitmap over top of the checkbox cell.
http://www.syncfusion.com/Support/user/uploads/GGC_ImageInCheckBox_afc04b7a.zip