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.

Images in row header column

Thread ID:

Created:

Updated:

Platform:

Replies:

803 Aug 20,2002 10:27 AM Aug 20,2002 04:50 PM Windows Forms 1
loading
Tags: GridControl
Trevor Redfern
Asked On August 20, 2002 10:27 AM

I have a virtual grid that I'm trying to get some images displaying in the row header column. I've tried a variety of ways of specifying an image list and index to this column to no avail, but the same code for the regular cells works fine. I've tried setting up the style at the grid's creation time (my grids are created dynamically) and I've tried to specify it in the QueryCellInfo event as well. But the image is either getting lost, or not drawing for some reason. Any ideas?

Clay Burch [Syncfusion]
Replied On August 20, 2002 04:50 PM

The default image drawing requires either a "Static" or "TextBox" CellType. RowHeader drawing is in GridHeaderCellRenderer.OnDraw which does not handle image drawing. So, one way you could get images in row headers is to change the celltype to Static. Here is a little code snippet that you could use in your QueryCellInfo to handle this. Private Sub QueryCellInfo(ByVal sender As Object, ByVal e As GridQueryCellInfoEventArgs) If e.ColIndex = 0 And e.RowIndex > 0 Then e.Style.ImageList = Me.imageList e.Style.CellType = "Static" e.Style.CellAppearance = GridCellAppearance.Raised e.Style.ImageIndex = 2 e.Handled = True End If End Sub

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.

;