RxDBGrid Sort Question lazarus / 16-Databases ---------------------------------------------------------------------- daveinhull · 2019-03-05 19:53 Hi, I'm trying to use the sort feature of the RxDBGrid, but it just keeps crashing. When I look at the code it appears that the SortEngine is Nil, but I'm not sure how to set it up. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TRxDBGrid.SetAutoSort(const AValue: boolean);var  S: string;  Pos: integer;begin  if FAutoSort = AValue then    exit;  FAutoSort := AValue;  if Assigned(DataSource) and Assigned(DataSource.DataSet) and    DataSource.DataSet.Active then  begin    S := DataSource.DataSet.ClassName;    if RxDBGridSortEngineList.Find(S, Pos) then      FSortEngine := RxDBGridSortEngineList.Objects[Pos] as TRxDBGridSortEngine    else      FSortEngine := nil;    FSortColumns.Clear;  end;end;           Has anyone used this and got it working? Thanks Dave