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.
Unfortunately, activation email could not send to your email. Please try again.

Grid grouping control

Thread ID:





67850 Aug 31,2007 06:11 PM Aug 31,2007 09:47 PM Windows Forms 1
Tags: GridControl
Sudharsini Ravikumar
Asked On August 31, 2007 06:11 PM


Is it possible to use the GridGroupingControl and also have RichTextcells, picture box cells etc?


J.Nagarajan [Syncfusion]
Replied On August 31, 2007 09:47 PM

Hi Sudha,

Thanks for your interest in Syncfusion product.

Regarding the Picture Cell:

You can add PictureBox cells in grid by using the below code snippet:

//To Add a Picture box
this.gridDataBoundGrid1.Model.CellModels.Add("ImageAndButton", new PictureBoxCellModel(this.gridDataBoundGrid1.Model));//new ImageAndButtonCellModel(this.gridDataBoundGrid1.Model));
GridStyleInfo style = this.gridDataBoundGrid1.Binder.InternalColumns["Index"].StyleInfo;
style.CellType = "ImageAndButton";

PictureBoxStyleProperties tsp = new PictureBoxStyleProperties(new GridStyleInfo(gridDataBoundGrid1.Binder.InternalColumns["Index"].StyleInfo));
tsp.SizeMode = PictureBoxSizeMode.AutoSize;
tsp.Image = SystemIcons.Information.ToBitmap();

Regarding the RichTextBox Cell:

You can add RichTextBox cell in a grid by setting the CellType property of the GridStyleInfo object to "RichText". Here is a code snippet that shows this task.

this.gridDataBoundGrid1.Binder.InternalColumns[3].StyleInfo.CellType = "RichText";

Please refer to the attached sample for implementation and let me know if this helps.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.