In a grid cell an IP-address is expected as input.
A routine in the GridCellValidate event checks if the input is a valid IP-adres, if not "Valid" is set to false and Grid.InvalidEntryTitle and Grid.InvalidEntryText are assigned with a string.
An editmask is used to make the IP-address.
When a non valid IP-address (like 999.999.999.999) is put in, the notification balloon is not showing !
When i remove the lines from the GridGetEditMask event, the notification Balloon is showing !
When i remove the lines from the GridGetEditMask event, the notification Balloon is showing !
Also when i walk through the grid the cells with an IP-address expextion are always validated !, thus even when they are not altered (Grid.AlwaysValidate is set to False).
The events are like underneet.
With best regards, Frank van Leijen.
procedure TForm_Basis.GridGetEditorType(Sender: TObject; ACol, ARow: Integer; var AEditor: TEditorType);
begin
if Grid.Cells[10, ARow] = 'IP-Adres' then
begin
if Grid.Cells[10, ARow] = 'IP-Adres' then
AEditor := edNormal;
end;
end;
procedure TForm_Basis.GridGetEditMask(Sender: TObject; ACol, ARow: Integer; var Value: string);
begin
if Grid.Cells[10, ARow] = 'IP-Adres' then
Value := '!099.099.099.099;1; ';
end;
begin
if Grid.Cells[10, ARow] = 'IP-Adres' then
Value := '!099.099.099.099;1; ';
end;