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

ColumnHeaderCell & Icon in Header Cell

Thread ID:





34833 Sep 16,2005 03:01 PM UTC Sep 18,2005 07:40 AM UTC WinForms 1
Tags: GridControl
Holger Leichsenring
Asked On September 16, 2005 03:01 PM UTC

Hi, I want to have an icon in a header cell plus the direction of a possible sort after clicking the header cell by using cell type ColumnHeaderCell/ GridSortColumnHeaderCellModel. If I set the CellType of the Header cell to static, it is possible to set an icon. For the sorting Icon on the right side of the header cell I have to use the cell type ColumnHeaderCell. Is there any existing code that I can use to show my Icon on the left side by having the sort direction icon on the right side? Thank you for your help. Holger

Administrator [Syncfusion]
Replied On September 18, 2005 07:40 AM UTC

Hi Holger, You can achive this by custom drawing your image in the grid''s CellDrawn event handler. private void gridDataBoundGrid1_CellDrawn(object sender, GridDrawCellEventArgs e) { GridDataBoundGrid grid = sender as GridDataBoundGrid; if(grid != null && e.RowIndex ==0 && e.ColIndex > 0 && e.Style.Tag != null) { GridStaticCellRenderer.DrawImage(e.Graphics, this.imageList1, 0, e.Bounds, false); } } Here is a small sample. Best regards, Jay N


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