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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Customize "Invalid Text" message in maskedit cell (within a datagrid)

Thread ID:

Created:

Updated:

Platform:

Replies:

18860 Sep 10,2004 02:55 PM UTC Sep 21,2004 11:12 AM UTC WinForms 2
loading
Tags: GridControl
Olivier Mayo
Asked On September 10, 2004 02:55 PM UTC

Hi, I am using a grid control and I have set the style of one of its columns to "MaskEdit". Here''s the code : gcAjustements.ColStyles(COL_MOIS_IMPACT_NUM).CellType = "MaskEdit" gcAjustements.ColStyles(COL_MOIS_IMPACT_NUM).MaskEdit.ClipMode = ClipModes.IncludeLiterals gcAjustements.ColStyles(COL_MOIS_IMPACT_NUM).MaskEdit.DateSeparator = "/" gcAjustements.ColStyles(COL_MOIS_IMPACT_NUM).MaskEdit.PromptCharacter = "*" gcAjustements.ColStyles(COL_MOIS_IMPACT_NUM).MaskEdit.PassivePromptCharacter = "*" gcAjustements.ColStyles(COL_MOIS_IMPACT_NUM).MaskEdit.PaddingCharacter = "*" gcAjustements.ColStyles(COL_MOIS_IMPACT_NUM).MaskEdit.Mask = "##/####" gcAjustements.ColStyles(COL_MOIS_IMPACT_NUM).MaskEdit.AllowPrompt = False In fact, I want the user to type in a month and year, in the following format : MM/YYYY **/**** is first shown and the * are replaced by what the user types in. If I do not respect the mask (like if *1/20** is shown), I get the message "Invalid Text: *1/20**" (which is good). However, I would like to customize this message, because my whole application is in french and I would want this message to also be in french. Could you please tell me how to do so? Thank you very much....

Administrator [Syncfusion]
Replied On September 10, 2004 03:07 PM UTC

Try handling the grid.ValidateFailed event. In your handler, you can the default message by checking grid.CurrentCell.ErrorMessage. You can also put your own text into grid.CurrentCell.ErrorMessage.

Olivier Mayo
Replied On September 21, 2004 11:12 AM UTC

Thanks you ;)

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.

Warning Icon 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.Close Icon

;