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.

Custom Data Validation

Thread ID:

Created:

Updated:

Platform:

Replies:

92126 Dec 21,2009 12:26 PM Dec 25,2009 12:56 AM Windows Forms 5
loading
Tags: XlsIO
Adrian Gingell
Asked On December 21, 2009 12:26 PM

Hi

Could you please point me at some examples of Custom Data Validation techniques? What I'd like to do is set the cell data validation 'Allow' to 'Custom' and then put a formula in the 'Source' field.

I've Googled this and come up with 'http://www.syncfusion.com/Products/Xlsio/windows/Articles/data_validation.aspx' but just get XML Parsing Error: no element found' when trying to view the page. Actually, I get this error quite often when trying to view Syncfusion pages, any idea why?

Thanks

Adrian

Balamurugan R [Syncfusion]
Replied On December 22, 2009 08:44 AM

Hi Adrian,

Thank you for your interest in syncfusion products
Could you please use this link to get more examples about the
data validation.

http://www.syncfusion.com:91/products/xlsio/backoffice/Articles/data_validation.aspx

Please,let us know if you have any queries,

Regards,
Balamurugan

Adrian Gingell
Replied On December 22, 2009 12:29 PM

Hi Balamurugan

So I set AllowType = ExcelDataType.User by what else do I need to do to set a custom formula? Please give me a clue.

I've tried various combinations of other IDataValidation properties but I never end up with 'Custom' showing in data validation when I later view the spreadsheet, it alway seems to be 'List'.

Regards

Adrian

Geetha M [Syncfusion]
Replied On December 23, 2009 11:07 PM

Hi Adrian,

Thank you for the details.

You can set custom data validation using the code snippet given below.

validation.AllowType = ExcelDataType.Formula;
validation.FirstFormula = "=IF(A2

Please refer to the sample placed in the link below and let us know if you have any questions.

http://help.syncfusion.com/samples/XlsIO.Windows/F92126/CustomDV.zip

Regards,
Geetha

Adrian Gingell
Replied On December 24, 2009 10:13 AM

Thanks very much Geetha, much appreciated, it works a treat.

Adrian

Geetha M [Syncfusion]
Replied On December 25, 2009 12:56 AM

Hi Adrian,

Glad to hear the solution worked for you.

Regards,
Geetha

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.

;