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.


Thread ID:





26394 Mar 22,2005 11:40 AM Mar 22,2005 01:30 PM Windows Forms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On March 22, 2005 11:40 AM

I am coloring a databound grid in the PrepareViewStyleInfo event which works fine, however when clicking in certain cells the coloring of the cells is changed to an incorrect color. How can I stop this event from firing when a user clicks a cell, or just ignore the click event in the PrepareViewStyleInfo event? The coloring of the grid only needs to occur when it is first loaded. Regards Aaron

Administrator [Syncfusion]
Replied On March 22, 2005 01:30 PM

You cannot turn PrepareViewStyleInfo off on a cell by cell basis. And, you have to continually set the color in PrepareViewStyleInfo or the color will be lost the next time the cell is drawn. So, you need to track down why PrepareviewStyleInfo is getting the wrong color. If you post your handler code here, maybe we can suggest something. If the color is set on a column basis, you can set it using GridBoundColumn.StyleInfo.Color for teh column. But if it varies from cell to cell, then you will have to use PrepareViewStyleInfo in a GridDataBoundGrid.


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.