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
close icon

get cell horizontal alignment in a virtual grid

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:

grid.CurrentCell.Renderer.CurrentStyle.HorizontalAlignment

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!

Jonathan

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:
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=50103&TabID=1&forumvalue=Essential%20Grid#

2 Replies

AD Administrator Syncfusion Team 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.
GCStyleInfo.zip

Best Regards,
Haneef


JH Jonathan Hartley 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.



Loader.
Live Chat Icon For mobile
Up arrow icon