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.

Positioning Image in merged cells in databound grid control

Thread ID:

Created:

Updated:

Platform:

Replies:

24548 Feb 7,2005 06:48 AM Feb 9,2005 12:18 AM Windows Forms 8
loading
Tags: GridControl
subair
Asked On February 7, 2005 06:48 AM

When i add an image in a merged cell in databoundgrid control ,the image comes in the middile of the merged cell.Is it possible to bring the images in top and left side of that merged cell?

Administrator [Syncfusion]
Replied On February 7, 2005 07:30 AM

How are you adding the image? If you draw it yourself in CellDrawn, then you can draw it anywhere you want. See this thread for some code snippets. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=16748 If you are using a Static or TextBox, and setting GridBoundColumn.StyleInfo.ImageIndex/ImageList, then the default behavior is to align the image to the left.

subair
Replied On February 8, 2005 04:15 AM

I am adding the image in the prepareviewstyle event of databoundgrid by setting imageindex of the cell from imagelist. since the column is merged image is coming in the center of the merged cells.I want to show the image in top left of the merged cell.Is it possible?if it is tpossible where from i ll get the sample code? pls reply immediately >How are you adding the image? > >If you draw it yourself in CellDrawn, then you can draw it anywhere you want. See this thread for some code snippets. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=16748 > >If you are using a Static or TextBox, and setting GridBoundColumn.StyleInfo.ImageIndex/ImageList, then the default behavior is to align the image to the left. >

Administrator [Syncfusion]
Replied On February 8, 2005 05:22 AM

Did you try using the CellDrawn event as was suggested yesterday? It seems to work for me. http://www.syncfusion.com/forums/Uploads/GDBG_ImageTL.zip

subair
Replied On February 8, 2005 07:05 AM

I tried the above method.But image is not coming in the top left for the merged cell.Here i am using the merging rows in column. But for merged cell i am not able to find the top side for placing the image.Is there any way to place in the top side of merged cell?

Administrator [Syncfusion]
Replied On February 8, 2005 07:33 AM

Does the sample work for you? Can you upload a sample project that does not work?

subair
Replied On February 8, 2005 09:07 AM

Hi, I had attached one picture of the grid.In this image is coming in the center of the merged cell. I want to put this image in the top left of the merged cell.I used the cell draw event of grid.But i am not able to find the top side of the merged grid.is it possible to put the image in the top of the merged cell?Pleas reply soon

Administrator [Syncfusion]
Replied On February 8, 2005 10:58 AM

The sample draws a picture at the top-left corner of the merged cells. In the sample, the CellDrawn event is only raised for the merged cells. (It is not raised for the cells that are not shown). The sample shows how to get the top left rectangle where you would want to draw the image in the top-left corner of the merged cell. Does this code to find the top-left corner not work for you?

subair
Replied On February 9, 2005 12:18 AM

Thanks very much ,Thats working

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.

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.

;