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.

any specific validations for ipaddress cell in a grid

Thread ID:

Created:

Updated:

Platform:

Replies:

81302 May 19,2009 01:09 AM May 20,2009 11:40 AM Windows Forms 3
loading
Tags: GridControl
Deepasri
Asked On May 19, 2009 01:09 AM

Hi,

I am using syncfusion gridcontrol for our project.

In the gridcontrol, I have 4 columns and a row.In a cell of the grid, I will enter the IPAddress.I want to know wheather there is any specific validations are available for IPaddress.

Kindly provide a solution for the above issue.

Thanks,
Deepa

Rajadurai C [Syncfusion]
Replied On May 19, 2009 09:04 AM

Hi Deepa,

Thanks for your interest in Syncfusion products.

In our Syncfusion Grid, there is support for holding masked(limited values in specified format) values in cell through celltype "MaskEdit". Please refer to the following code that sets cell(1,1) as "MaskEdit" celltype.

this.gridControl1[1, 1].CellType = "MaskEdit";
GridStyleInfo style = this.gridControl1[1, 1];
GridMaskEditInfo maskstyle = style.MaskEdit;
maskstyle.Mask = "999.999.999.999";

Mask is the property to which the masking format must be set. Here, the number '9' accepts only numbers from 0 to 9 in its place and only 12 numbers can be added.

Regards,
Rajadurai

Deepasri
Replied On May 19, 2009 09:29 AM

Hi Rajadurai,

Thanks for your reply.I have done one test application, As you have mentioned, I have created a cell with celltype as "MaskEdit" and assigned the Mask as "999.999.999.999".It works well, If I give all 12 numbers in the cell.But, if I enter value as "11.1.1.1" and click a button then, my value is becoming as "111.11.."

I have attached the screenshots, before button is clicked and after the button is clicked with the source files for your reference.Please provide solution.

Thanks,
Deepa



MaskEdit_89703315.zip

Rajadurai C [Syncfusion]
Replied On May 20, 2009 11:40 AM

Hi Deepa,

Thanks for your update.

The Mask reserves spaces for characters. If the cell is left without entering the space in-between, the characters are ordered in such a way that blank remains only at the right.

If you don't want this to happen, you can make use of PaddingCharacter property. Please refer to the following code.

this.gridControl1[1, 1].CellType = "MaskEdit";
GridStyleInfo style = this.gridControl1[1, 1];
GridMaskEditInfo maskstyle = style.MaskEdit;
maskstyle.Mask = "999.999.999.999";
maskstyle.PaddingCharacter = '0';


Regards,
Rajadurai

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.

;