TWebStringGrid sorting of fixed columns doesn't work

I have 2 problems with sorting a TWebStringGrid:

  1. When I sort by a regular column, the fixed columns are not sorted; and
  2. When I attempt to sort by a fixed column I get an error.

To reproduce this, drop a TWebStringGrid onto a form and then add this code:

procedure TAdminForm.WebFormShow(Sender: TObject);
var
  r, c: integer;
begin
  WebStringGrid1.RowCount := 5;
  WebStringGrid1.ColCount := 5;
  for c := 0 to 4 do
  begin
    for r := 0 to 4 do
    begin
      WebStringGrid1.Cells[c, r] := IntToStr(c * 10 + r);
    end;
    WebStringGrid1.AddSortIndicator(c, 0, siAScending);
  end;
end;

This is what it looks like initially:

Then click on the sort indicator for column "30" and I get this (grid is sorted correctly except for the fixed column):

Now click on the sort indicator for the fixed column "0" and I get an error:

At this moment, fixed columns were not designed to be sortable.
We've improved the code to avoid the error.
To have a sortable column, make sure it is non-fixed.

Hi Bruno, thanks for looking at this. It's an acceptable limitation to say that you can't sort by a fixed column, but my first example showed that the limitation really is that you cannot sort by any column if you have any fixed columns. It doesn't make sense for a sort to reorder the rows of the non-fixed columns without the fixed columns being reordered in the same way.
Kind regards.

Technically, the fixed column(s) and normal cells are in different HTML tables (to achieve proper scrolling). We'll investigate what we can do about this.

FTR, I've worked around the problem by adding some hidden (width=0) non-fixed columns with the same data as the fixed columns. After every sort, I copy the data from the hidden columns into the fixed columns, so the fixed columns appear to get sorted as well. I can even sort on a fixed column by sorting on the corresponding hidden column instead.

Thanks for informing & good temporary solution indeed!