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

hexadecimal mask

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.

3 Replies

AD Administrator Syncfusion Team October 14, 2003 08:11 AM UTC

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;

DO Doug October 14, 2003 03:35 PM UTC

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.

AD Administrator Syncfusion Team October 14, 2003 04:22 PM UTC

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.

Live Chat Icon For mobile
Up arrow icon