Grid grouping control

Hi

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

Thanks
Sudha

1 Reply

J. J.Nagarajan Syncfusion Team September 1, 2007 01:47 AM UTC

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.
http://websamples.syncfusion.com/samples/Grid.Windows/F67852/main.htm


Regards,
Nagaraj

Loader.
Up arrow icon