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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Column Header Styles

Thread ID:

Created:

Updated:

Platform:

Replies:

1654 Nov 18,2002 05:06 PM UTC Nov 18,2002 10:25 PM UTC WinForms 3
loading
Tags: GridControl
Ivan Pelly
Asked On November 18, 2002 05:06 PM UTC

Hi - We'd like to conditionally have an image in the column header of the GridDataBoundGrid. We tried creating a new GridBaseStyle, and setting its properties using Grid.BaseStylesMap, then applying the style to the header cell (as per the example on page 46 of gridug.pdf) but this doesn't seem to work. In particular, we want to be displaying (or not) an image in response to the user clicking in the header (as happens automatically when grid sorting is enabled). Thanks in advance - Ivan Pelly

Administrator [Syncfusion]
Replied On November 18, 2002 05:14 PM UTC

The easiest way to draw an image in a header cell is to change the celltype from Header to Static. Static cells support drawing images by including teh ImageList and ImageIndex as part of the cell style. But Header celltype does not support the ImageList & ImageIndex drawing. If you want your header cells to have a different appearance than the default flat look, then set the style's Appearance property. You could try appropriately setting these properties in the CellClick event, and then calling RefreshRange on the cell to make sure it gets redrawn with the new properties.

Ivan Pelly
Replied On November 18, 2002 07:05 PM UTC

We're currently attempting to change the celltype with the following code: GridDataBoundGrid1(0, 10).CellType = "Static" Should this work? (It doesn't seem to) Thanks, Ivan Pelly

Administrator [Syncfusion]
Replied On November 18, 2002 10:25 PM UTC

For a GridDataBoundGrid, to change individual cell properties, you will have better results using the PrepareViewStyleInfo event, and setting the e.Style with eth properties you want bases on the e.RowIndex and e.ColIndex values passed in.

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

;