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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to change Style and data of one cell...without using a event

Thread ID:

Created:

Updated:

Platform:

Replies:

96566 Sep 20,2010 08:22 PM UTC Sep 24,2010 05:36 AM UTC WinForms 1
loading
Tags: GridControl
David Mecteaux
Asked On September 20, 2010 08:22 PM UTC

Hi,

Could someone show me how to change the data in a cell and its style programmatically. I don't want to do this within a event (no QueryCellStyleInfo). I want to do it somewhat like:

gridGroupingControl1.blah.blah.Style.ReadOnly = true;
gridGroupingControl.blah.blah.CellValue = "Hello"

Thanks,

---Dave


Jisha Joy [Syncfusion]
Replied On September 24, 2010 05:36 AM UTC

Hi Dave,

Thank you for using Syncfusion products.

In a GridGroupingControl, QueryCellStyleInfo event or TableControlPrepareViewStyleInfo event should be used to set cell styles. In a GridGroupingControl, we cannot use indexers to set style properties (other than the Text) for individual cells. The reason is that in a GridGrouping Control, there are no individual cell styles stored. See the following sample in which required behavior is implemented by using the QueryCellStyleInfo event:

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=GGCQuery1364870035.zip

If you want to apply row styles depending on the cellvalues, you could use GridConditionalFormatDescriptor. See the following sample from the sample browser:


..\Windows\Grid.Grouping.Windows\Samples\2.0\Appearance\Conditional Formatting Demo

Please let me know if you have any questions.

Regards,
Jisha


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.

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

;