Forum > Databases

RxDBGrid Sort Question

(1/1)

daveinhull:
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  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---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

Navigation

[0] Message Index

Go to full version