My name is Daniel, from Taiwan. I have a little problem and need for your assists!
How to check the data in cxGrid are all unique during data input?
I was using TDBGrid before and did the check like this:
procedure TDataModuleLcEntry1.QueryLc12ORDNOChange(Sender: TField);
if CheckDup(QueryLc12ORDNO.AsString) then
// go further
ShowMessage('ORDER NO. Duplicate, Please input again!');
function TDataModuleLcEntry1.CheckDup(myOrd: string): boolean;
V := QueryLc12.Lookup('ORDNO', myOrd, 'ORDNO');
Result := (VarType(V) in [varNull]);
This dosen't work with cxGrid, the ORDNO Column in cxGrid will all became the value as myOrd! don't know why!
My English is not very well, hope you can understand what I am asking! Thanks for your help!