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

Grid Header Font

Thread ID:





88249 Jul 17,2009 06:40 PM UTC Jul 22,2009 02:33 PM UTC WPF 1
Tags: GridControl
David Allen Lubbers
Asked On July 17, 2009 06:40 PM UTC

How do I set the font in the cell header of the GridDataControl in xaml?

Clay Burch [Syncfusion]
Replied On July 22, 2009 02:33 PM UTC

Currently, there is no way to set the column header font from xaml. We will expose a property to do so.

Currently, you can only set it from code through an event.

//use the ModelLoaded event to subscribe to the PrepareRenderCell event on the embedded GridControlBase.
grid.ModelLoaded += new EventHandler((sender, e) => grid.Model.Views.First().PrepareRenderCell += new GridPrepareRenderCellEventHandler(Window1_PrepareRenderCell));

//the event handler
void Window1_PrepareRenderCell(object sender, GridPrepareRenderCellEventArgs e)
GridDataStyleInfo style = e.Style as GridDataStyleInfo;
if (e.Style.CellIdentity.RowIndex == 0)
e.Style.Font.FontSize = 22;
e.Style.Font.FontWeight = FontWeights.Bold;


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