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.
Syncfusion Feedback

GDBG - displaying an image in a column

Thread ID:

Created:

Updated:

Platform:

Replies:

58820 Mar 29,2007 07:37 AM UTC Mar 29,2007 02:59 PM UTC Windows Forms 1
loading
Tags: GridControl
tzvika
Asked On March 29, 2007 07:37 AM UTC

hi there,

i have a GDBG that is binded to a data table. i would like to add a column to the grid that will display the same image in all of it's cells. how should i do this?

should i add a new column to the data table aswell? or is it posible adding a column to the grid that is unbinded to the datatable?

haneefm [Syncfusion]
Replied On March 29, 2007 02:59 PM UTC

Hi Tzvika ,

is it posible adding a column to the grid that is unbinded to the datatable?
>>>>
Yes, It is possible by adding the unbound columns in grid. Here is a KB article that shows you "How do I insert an unbound check box column in a GridDataBoundGrid?".
http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=305

Below is a code snippet for adding the image column in a grid. Please try the code snippet and let me know if this helps.

[C#]
GridBoundColumnsCollection column5 = (GridBoundColumnsCollection) this.gridDataBoundGrid1.Binder.InternalColumns.Clone();

GridBoundColumn Ucolumn5 = new GridBoundColumn();
Ucolumn5.HeaderText = "Image";
Ucolumn5.MappingName = "Image";
Ucolumn5.StyleInfo.CellType = "Image";
ImageList list = new ImageList();
list.Images.Add(SystemIcons.Exclamation.ToBitmap());

Ucolumn5.StyleInfo.ImageList = list;
Ucolumn5.StyleInfo.ImageIndex = 0;
column5.Add(Ucolumn5);

this.gridDataBoundGrid1.Binder.GridBoundColumns = column5;

Best Regards,
Haneef

CONFIRMATION

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.

Warning Icon 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.Close Icon

;