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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Images in row header column

Thread ID:





803 Aug 20,2002 02:27 PM UTC Aug 20,2002 08:50 PM UTC WinForms 1
Tags: GridControl
Trevor Redfern
Asked On August 20, 2002 02:27 PM UTC

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 08:50 PM UTC

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


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon