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

format data for a column

I want to disply data with a format for a column in a GridDataBoundGrid control. e.g. Telepone or SSN. (206) 123-4567 or 123-45-6789. But these data are in foramt 1234567 or 123456789 in dataset. Can I use a mask on a column to format it? Thanks

1 Reply

AD Administrator Syncfusion Team March 5, 2004 04:03 PM UTC

Yes, you shoul dbe able to do this. The excludeliterals setting is what allows teh raw data not to have teh formatting characters. Dim style3 as GridStyleInfo = Me.Grid.GridBoundColumns("PhoneNumber").StyleInfo style3.CellType = "MaskEdit" maskedEditStyle3.AllowPrompt = False maskedEditStyle3.ClipMode = Syncfusion.Windows.Forms.Tools.ClipModes.ExcludeLiterals style3.CultureInfo = New System.Globalization.CultureInfo("en-US") maskedEditStyle3.DateSeparator = "-"c maskedEditStyle3.Mask = "(999) 999 - 9999" style3.MaxLength = 16 maskedEditStyle3.SpecialCultureValue = Syncfusion.Windows.Forms.Tools.SpecialCultureValues.None style3.Text = "(___) ___ - ____" maskedEditStyle3.UseLocaleDefault = False maskedEditStyle3.UseUserOverride = True The first may need to be Dim style3 as GridStyleInfo = Me.Grid.Binder.InternalColumns("PhoneNumber").StyleInfo if you have not explicitly added GridBoundColumns.

Live Chat Icon For mobile
Up arrow icon