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

MaskEdit delete

Thread ID:

Created:

Updated:

Platform:

Replies:

33210 Aug 16,2005 11:23 AM UTC Aug 17,2005 08:10 AM UTC Windows Forms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 16, 2005 11:23 AM UTC

I am using the gridcontrol in my application. I have set the cell type of one of the cells to MaskEdit. I have not specified any mask for this cell. When i enter data (string) in the cell and delete the text using Delete key the value(that particular character) is not getting deleted. But when i use backspace it works fine. Kindly let me know how to solve this problem.

Administrator [Syncfusion]
Replied On August 16, 2005 01:03 PM UTC

I think this is a defect in our code. Here is a work-around using the CurrentCellControlKeyMessage event that worked for me. private void gridControl1_CurrentCellControlKeyMessage(object sender, GridCurrentCellControlKeyMessageEventArgs e) { Keys keyCode = (Keys)((int)e.Msg.WParam) & Keys.KeyCode; if(e.Msg.Msg == 0x100) //WM_KEYDOWN { if(keyCode == Keys.Delete) { GridMaskedEditBox meb = e.Control as GridMaskedEditBox; if(meb != null) { meb.SelectionLength = Math.Max(1, meb.SelectionLength); meb.SelectedText = ""; e.Handled = true; e.Result = true; } } } }
 

Administrator [Syncfusion]
Replied On August 17, 2005 05:28 AM UTC

Clay This logic works fine for the maskedit cells that do not have any mask. But it broke the logic for the maskedit cells for which mask is given. After adding this code, for mask edit cells with mask, the delete key works.But after delete if i am using backspace it doesnot work. Kindly let me know how to solve this problem

Administrator [Syncfusion]
Replied On August 17, 2005 08:10 AM UTC

How do I see the problem you are having in this sample? http://www.syncfusion.com/Support/user/uploads/GC_Print_6ff01a68.zip

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

;