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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Custom Data Validation

Thread ID:





92126 Dec 21,2009 05:26 PM UTC Dec 25,2009 05:56 AM UTC WinForms 5
Tags: XlsIO
Adrian Gingell
Asked On December 21, 2009 05:26 PM UTC


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?



Balamurugan R [Syncfusion]
Replied On December 22, 2009 01:44 PM UTC

Hi Adrian,

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


Please,let us know if you have any queries,


Adrian Gingell
Replied On December 22, 2009 05:29 PM UTC

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'.



Geetha M [Syncfusion]
Replied On December 24, 2009 04:07 AM UTC

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.



Adrian Gingell
Replied On December 24, 2009 03:13 PM UTC

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


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

Hi Adrian,

Glad to hear the solution worked for you.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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