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. Image for the cookie policy date
close icon

image on column and row header of datagrid

Hi, I need to display an image and text on the row and column headers. However when I do that, I lose the 3d effect and the borders around the header cells. How do I fix this ? Any help will be appreciated. Thanks,

3 Replies

AD Administrator Syncfusion Team March 18, 2004 05:36 PM UTC

You can add a 3d effect by setting the style.CellAppearance property for the header cell.


MA Mark April 19, 2004 06:39 AM UTC

Hi Raj, I would like to insert an image on the row header of the datagrid table. Could you help me to do this ? Thanks Mark > Hi, > > I need to display an image and text on the row and column headers. However when I do that, I lose the 3d effect and the borders around the header cells. How do I fix this ? > > Any help will be appreciated. > > Thanks, > >


AD Administrator Syncfusion Team April 19, 2004 12:01 PM UTC

Hi Mark, You can do this by handling the PrepareViewStyleInfo in a GDBG. Here is some code snippet. private void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventArgs e) { if(e.ColIndex == 0 ) { e.Style.CellType = "Image"; e.Style.CellAppearance = GridCellAppearance.Raised; if(e.RowIndex == 3) { e.Style.ImageList = imageList; e.Style.ImageIndex = 1; } } } Regards, Jay N.

Loader.
Live Chat Icon For mobile
Up arrow icon