Below is my code:
var
i : integer;
...
...
if not VarIsNull(TcxLookupComboBox(Sender).EditValue) then
begin
i := Integer(TcxLookupComboBox(Sender).EditValue);
end;
I can use VarToStr
to convert variant into string but there is no VarToInt
in Delphi for this. So, I have converted it like this Integer(TcxLookupComboBox(Sender).EditValue)
. Is this the right approach?