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.
Syncfusion Feedback

Howto erase mask in empty maskedit cell

Thread ID:

Created:

Updated:

Platform:

Replies:

45123 Jun 12,2006 05:26 PM UTC Jun 13,2006 06:07 AM UTC Windows Forms 2
loading
Tags: GridControl
Christian Lützenkirchen
Asked On June 12, 2006 05:26 PM UTC

Hi, I am using a MaskEdit-Cell in a GridControl with a mask for a GUID "{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAA}". Can I only show the mask when the cell-value is not empty? When the user does not enter data I want to get an empty string, when the user enters a value I want to get an string with mask. How can I get this behaviour in a standalone MaskedEditBox? Regards, Christian

Administrator [Syncfusion]
Replied On June 13, 2006 04:36 AM UTC

Hi Christian, The gridControl1.DrawCellDisplayText event can be handled and there the DisplayText can be set to empty string(“”) when the MaskEdit cell value is empty. Below is a code snippet. Please post any standalone tools’ quires in the Essential Tools forums to get the solution at the earliest. private void gridControl1_DrawCellDisplayText(object sender, GridDrawCellDisplayTextEventArgs e) { if(e.Style.HasMaskEdit && !e.Style.HasCellValue) e.DisplayText = ""; } Regards, Calvin.

Christian Lützenkirchen
Replied On June 13, 2006 06:07 AM UTC

Hi Calvin, thank you for your reply. It works fine. Regards, Christian

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

;