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

DataGrid header alignment

I would like to change text header alignment in datagrid only for header text. And rest let as is in column properties in TableStyle. e.g. header text is aligned in center and the rest have right elignment. My idea is to replece text in header with my text by e.DrawString method. But I need to know rectangle of given column header. I can't use getCellBounds, it works only for rows and colmuns from index 0. How can I acquire it? Do you have any solution for header alignment? Thank you for your advice Libor Polansky

1 Reply

AD Administrator Syncfusion Team April 5, 2003 06:02 PM UTC

This FAQ draws text into the RowHeaders. It works around the problem of GetCellBounds not working for headers. Maybe the same techniques will work to get the column header cellbounds. How can I place text in the rowheader column of my datagrid? http://www.syncfusion.com/faq/winforms/search/896.asp

Loader.
Live Chat Icon For mobile
Up arrow icon