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.
Unfortunately, activation email could not send to your email. Please try again.

Trying to format a cell

Thread ID:

Created:

Updated:

Platform:

Replies:

127837 Dec 12,2016 11:30 AM Dec 13,2016 08:52 AM Windows Forms 1
loading
Tags: GridDataBoundGrid(Classic)
Dave Wheeliker
Asked On December 12, 2016 11:30 AM

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



Piruthiviraj Malaimelraj [Syncfusion]
Replied On December 13, 2016 08:52 AM

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 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;