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

get cell horizontal alignment in a virtual grid

Thread ID:





52203 Nov 23,2006 11:22 AM UTC Dec 5,2006 12:58 PM UTC WinForms 2
Tags: GridControl
Jonathan Hartley
Asked On November 23, 2006 11:22 AM UTC

Hey folks,

Getting the horizontal alignment of cells in a virtual grid isn't behaving as we'd expect, and we're not sure what we're doing wrong:

We have a virtual grid. We're setting the horizonal alignment of cells in the QueryCellInfo event. We change this aligntment from right to left if the cell is currently being edited (to produce Excel-like behavior when editing numbers)

Other code, outside of OnQueryCellInfo, would like to know the current horizontal alignment of a cell. We're retrieving it using:


When QueryCellInfo changes the alignment in response to the cell being edited, this change is immediately visible on-screen. However, the value retrieved from grid.CurrentCell....HorizontalAlignment does not update for X seconds, where X varies from about 15 to 90, and is different each time.

We don't understand. Any clues? Thanks!


This query is a follow up from an earlier thread, but it seems to have moved on into an entirely new problem now, so I'm starting this new thread for it. Old thread:

Administrator [Syncfusion]
Replied On November 24, 2006 05:18 AM UTC

Hi Jonathan,

Thanks for the update.

Please try the attached sample that is working fine, let me know if you are looking something different.

Best Regards,

Jonathan Hartley
Replied On December 5, 2006 12:58 PM UTC

Thanks a lot Haneef! Your sample is very clear, and is very much appreciated.

However, the problem we are having is from code which is not in a grid event handler.

Your sample seems like a great starting point for me to try and add some minimal code which demonstrates our problem. I'll try and do that and get back to you.

Thanks for your help to date.


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