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

DataGrid header alignment

Thread ID:





3738 Apr 4,2003 12:42 PM UTC Apr 5,2003 06:02 PM UTC WinForms 1
Tags: FAQ
Libor Polansky
Asked On April 4, 2003 12:42 PM UTC

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

Administrator [Syncfusion]
Replied On 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


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

Live Chat Icon For mobile
Live Chat Icon