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

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


1 Reply

JJ Jisha Joy Syncfusion Team 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


Loader.
Up arrow icon