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

Problems changing text color

Thread ID:





17298 Aug 5,2004 10:58 AM UTC Aug 5,2004 11:11 AM UTC WinForms 1
Tags: GridControl
jose acidrain
Asked On August 5, 2004 10:58 AM UTC

I´m using GridDataBoundGrid and i need to change the color of the text of a cell depending of the result of a condition evaluated on the event CurrentCellDeactivated. I have modified one of the samples content in the Essential Suite. In that example, (that use a ControlGrid instead of a GridDataBoundGrid) inside the method triggered by the event CurrentCellDeactivated, i´m able to modify the color of the text of the cell just by using this sentence: mySyncfussiongrid[currentCell.RowIndex,currentCell.ColIndex].TextColor = Color.Red; However, when i use the same sentence in my own code using a GridDataBoundGrid, the color of the text don´t change (but anyway i can modify the text using the Text property). Is there any problem chaging the color of the GridDataBoundGrid? I mean, Is there any other way to modify the color of the text? Thanks.

Administrator [Syncfusion]
Replied On August 5, 2004 11:11 AM UTC

You cannot use an indexer on a GridDataBoundGrid to change any style property other than the cell value (which is the only thing your datasource holds). To change the color of a single cell in a GridDataBoundGrid, you need to use the PrepareViewStyleInfo event ot do it dynamcially. Here is a KB link. http://www.syncfusion.com/Support/article.aspx?id=560


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

Live Chat Icon For mobile
Live Chat Icon