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

DataGrid - Alignment when using custom DataGridTextBoxColumn styl

Thread ID:




29893 Jun 6,2005 02:42 PM UTC WinForms 0
Tags: FAQ
Randall Cornish
Asked On June 6, 2005 02:42 PM UTC

I have implemented the DataGridTextBoxColumn code that allows a particular cell to have custom formatting (DataGrid FAQ 5.67). This code was straight-forward and I had no trouble making it do what I wanted - bold the last row in the grid. However, when implementing this code, I seem to have lost the ability to influence the Horizontal alignment at the Column level. if (j == 1 || j == 2) { cs.Alignment = HorizontalAlignment.Center; cs.Width = 100; } Both examples I have seen on this Paint() event handler seem to also have ALL the cells left-aligned. Do I now need to implement another event handler to get my alignment ability back? Thanks,


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