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.

hexadecimal mask

Thread ID:

Created:

Updated:

Platform:

Replies:

7887 Oct 13,2003 05:09 PM Oct 14,2003 12:22 PM Windows Forms 3
loading
Tags: GridControl
Doug
Asked On October 13, 2003 05:09 PM

I would like to know if a hexadecimal mask is available in the MaskEdit cells. If not, is this a feature that is planned on being implemented? Thanks.

Administrator [Syncfusion]
Replied On October 14, 2003 04:11 AM

There is currently no hexadecimal mask for the MaskEdit cell. I will forward your request to the tools team to see what would have to be done to add support for such a mask. You could also handle this yourself in a straight-forward manner using a grid event like CurrentCellValidateString.
private void gridControl1_CurrentCellValidateString(object sender, GridCurrentCellValidateStringEventArgs e)
{
	//identify the cell somehow - we assume col2 is the hex col
	GridCurrentCell cc = this.gridControl1.CurrentCell;
	if(cc.ColIndex == 2)
	{
		foreach (char c in e.Text)
		{
			char c1 = c.ToString().ToLower()[0];
			if("abcdef0123456789".IndexOf(c1) == -1)
			{
				e.Cancel = true;
				break;
			}
		}
	}
}

Doug
Replied On October 14, 2003 11:35 AM

This solution works great for TextBoxes, but I want to use the formatting that a mask gives me as well. TextBoxes will validate after each letter is typed, but MaskEdit cells will only validate upon leaving the cell. Is there a way to use MaskEdit cells and still be able to exclude all alphanumerics except 0-9, a-f? Thanks.

Administrator [Syncfusion]
Replied On October 14, 2003 12:22 PM

There is no simple way to do this that I know of. It would require deriving several classes to attempt it. The tools engineer who handles the MaskEdit said that he would try to add support for a Hex char mask. Maybe it will mak ethe upcoming 2.0 release.

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.

;