Formatting CellValue

A cell value contain phone numbers and I want to format the values as (xxx)-xxx-xxxx. Please how do I achieve this?

2 Replies

ST stanleyj Syncfusion Team February 24, 2006 05:24 PM UTC

Hi Kingsly, Use MaskEdit CellType and take a look at the sample in \Syncfusion\Essential Studio\4.1.0.50\windows\Grid.Windows\Samples\CellTypes\MaskEditCells folder. GridStyleInfo style = gridControl1[2, 2]; style.CellType = "MaskEdit"; style.MaskEdit.Mask = "(999)-999-9999"; Regards, Stanley


KI Kingsley February 24, 2006 05:44 PM UTC

Thanks, your sample works fine. >Hi Kingsly, > >Use MaskEdit CellType and take a look at the sample in \Syncfusion\Essential Studio\4.1.0.50\windows\Grid.Windows\Samples\CellTypes\MaskEditCells folder. > > GridStyleInfo style = gridControl1[2, 2]; > style.CellType = "MaskEdit"; > style.MaskEdit.Mask = "(999)-999-9999"; > >Regards, >Stanley

Loader.
Up arrow icon