EventOnAddRow
- Merve Yurdakul
- Former user (Deleted)
Owned by Merve Yurdakul
Apr. 06, 2018
1 min read
Loading data...
Beschreibung
Dieses Event wird beim Hinzufügen einer neuen Zeile im Positionsgrid für alle Kopf- und Positionsfelder ausgelöst.
Beispiel
Procedure EventOnAddRow; begin end;
Procedure SetPositionItemNumbers; begin try if ccTable.RowCount > 0 then begin ItemStrNum := VarToStr(ccTable.GetValue(0,0)); if length(ItemStrNum) > 0 then begin if (strtoint(ItemStrNum) mod 10) = 0 then IncItemNumber := 10 else IncItemNumber := 1; end else IncItemNumber := 10; end else IncItemNumber := 10; except IncItemNumber := 10; end; ItemNumber := 0; for i:=0 to ccTable.RowCount-1 do begin ItemStrNum := VarToStr(ccTable.GetValue(0,i)); if length(ItemStrNum) = 0 then begin ItemNumber := GetPositionMaxItemNumber + IncItemNumber; ccTable.SetValue(0,i,inttostr(ItemNumber)); end; end; end; Procedure EventOnAddRow; begin SetPositionItemNumbers; end;