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. Image for the cookie policy date
close icon

Trying to format a cell

Hi
I am trying to format a cell so that when a user inputs a new record the cell (Postcode) allows only correct formatting though.  I have tried this myself with 'cell type' set to masked edit but this just put the mask into the cell ie. 'LL00 0LL' using widows masking.  Any help would be appreciated.


Regards
Dave



1 Reply

PM Piruthiviraj Malaimelraj Syncfusion Team December 13, 2016 01:52 PM UTC

Hi Dave, 

Thanks for your interest in Syncfusion products. 

We have analyzed your scenario and created the simple sample as per your requirement. To set the mask for the particular column , Mask property of GridMaskEditInfo can be used. Please make use of the below code, 

Code example: 
this.gridDataBoundGrid1.Model.ColStyles["Description"].CellType = GridCellTypeName.MaskEdit; 
this.gridDataBoundGrid1.Model.ColStyles["Description"].MaskEdit.Mask = "##-##-##"; 
 
Sample link: 
 
Dashboard sample location: 
<InstalledLocation\Syncfusion\EssentialStudio\VersionNumber\Windows\Grid.Windows\Samples\Cell Types\Editor Cell Demo> 

Note: 
If we misunderstood anything from your scenario, please provide us with screenshots of your application which shows what you want to achieve. 

Regards, 
Piruthiviraj 


Loader.
Live Chat Icon For mobile
Up arrow icon