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

get cell horizontal alignment in a virtual grid

Thread ID:

Created:

Updated:

Platform:

Replies:

52203 Nov 23,2006 06:22 AM Dec 5,2006 07:58 AM Windows Forms 2
loading
Tags: GridControl
Jonathan Hartley
Asked On November 23, 2006 06:22 AM

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#

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

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

Jonathan Hartley
Replied On December 5, 2006 07:58 AM

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.



CONFIRMATION

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.

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.

;