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 - Alignment when using custom DataGridTextBoxColumn styl

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,

Loader.
Live Chat Icon For mobile
Up arrow icon