Compare and Format a cell from GroupingGrid

Hi,
I am currently using syncfusions Grouping grid control. While displaying data we want to compare data froma perticualr cell and depending upon condition we want to change background color and tooltip for a particular cell of the grouping grid.



1 Reply

VK Vishnu Kumar Syncfusion Team February 15, 2008 09:54 AM UTC

Hi Umesh

Thank you for your patience.

Issue:Compare and Format a cell from GroupingGrid

You can compare the cell values and apply the background color and Tooltip of the particular row using the below code snippet :


GridConditionalFormatDescriptor gcfd1 = new GridConditionalFormatDescriptor();
gcfd1.Name = "Criteria1";
switch (ProductID.SelectedItem.ToString())
{
case "Equals":
{
gcfd1.Expression = "[ProductID]=" + this.DDLPid.SelectedItem.Text;
break;
}
}
Color c1 = Color.FromName(colorProduct.SelectedItem.Text);
gcfd1.Appearance.AnyRecordFieldCell.BackColor = c1;
gcfd1.Appearance.AnyRecordFieldCell.CellTipText = "ProductCell";
this.GridGroupingControl1.TableDescriptor.ConditionalFormats.Add(gcfd1);


Please refer the sample in the below link which illustrates the above:

http://websamples.syncfusion.com/samples/Grid.Web/6.1.0.34/71830/main.htm

Please try running the above sample and let me know if this helps.

Regards,
Vishnu.




Loader.
Up arrow icon