Page 1 of 1

Migrating DataValidation from 4 to 5

Posted: Mon Jun 24, 2013 2:05 pm
by leek
Hello;

I'm having trouble to upgrade an existing validation code written in Delphi 7:

1. TXlsDataValidation in unit XlsValidate5 does not have SetList method.
2. TDataValidation in unit BIFF_Validate5 does but cannot be added using ws.Validations.Add.
3. What is the purpose of the 3 types of source files starting with BIFF, XC12, XLS, and XPGP?
4. Is there any documentation describing this components?

Thank you for your help!

var
ws: TXLSWorksheet;
dv: TXlsDataValidation; //used to be TDataValidation which still have needed SetList method;
begin
dv := ws.Validations.Add;
dv.Areas.Add(0, cDataRowID + 1, 0, LastRow);
dv.ValidationType := x12dvtList;
dv.ValidationOperator := x12dvoBetween;
dv.ValidationStyle := x12dvesStop;
dv.SetList(['u', 'update', 'a', 'add', 'insert']);
dv.ErrorTitle := 'Invalid Action';
dv.ErrorMsg := 'Only values from the list can be used!';

Re: Migrating DataValidation from 4 to 5

Posted: Tue Jun 25, 2013 4:47 pm
by larsa
Hello

1,2 Issues regarding Data Validation will be addressed in a later uodate.
3. Create the component. It would take to long time to give a detailed answer on that.
4 There is a thml help that gives the component hierarchy.

Re: Migrating DataValidation from 4 to 5

Posted: Thu Jan 29, 2015 5:35 am
by mwhiting
See viewtopic.php?f=16&t=2330&p=5683&sid=9e ... 0a8a#p5683. I posted code that will work for the Data Validations
(I'm using 50.20.41)