GridGroupingControl cell error message

I have gridGroupingControl. I want to add cell error message into for example second cell in define column. How can I do it?

1 Reply

JS Jeba S Syncfusion Team April 14, 2007 06:06 AM UTC

Hi Vladymyr,

You can try handling TableControlPrepareViewStyleInfo or QueryCellStyleInfo and set the error message in the CellTipText property.

private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
GridTableCellStyleInfo style = e.Style as GridTableCellStyleInfo;
if(e.TableCellIdentity.DisplayElement.Kind == DisplayElementKind.Record )
{
e.Style.CellTipText = "Your Error message";
}
}

Please refer the attached the sample that validates the cell value and shows the ErrorProvider with respect to the current cell in a button click.

Here is the link for the sample:
http://websamples.syncfusion.com/samples/Grid.Windows/F59467/main.htm

Kindly let us know if this helps.

Best Regards,
Jeba



Loader.
Up arrow icon