Windows 7 SP1 x64
RAD Studio 10.1 Berlin Update 2
TMS VCL UI Pack v10.1.6.2
Hi,
I would like to know if the following results are normal:
- Create a new form and add an AdvStringGrid.
- Set the OnGetDisplText to:
procedure TForm1.AdvStringGrid1GetDisplText(Sender: TObject; ACol, ARow: Integer; var Value: string);
const
user_value = '<B>Test</B>';
begin
if ACol = 1 then
begin
Value := user_value;
end
else if ACol = 2 then
begin
Value := TNetEncoding.HTML.Encode(user_value);
end
else if ACol = 3 then
begin
Value := '<>' +user_value + '</>';
end
else if ACol = 4 then
begin
Value := '<>' +TNetEncoding.HTML.Encode(user_value) + '</>';
end;
end;
- Run the program.
The first column displays: "Test"
The second column displays "<B>Test</B>"
The third column displays: "Test"
The forth column displays: "<B>Test</B>"
Is it normal for the second column to not render the HTML character escapement?
I can always use the grid with empty tag like I do in forth column, since I do not want the user_value to be rendered, but it does seems a bit strange.
Thanks,
Raphaël Sylvain