anchor.diff:    if aSettings.Width.NotNull then
       aColumn.Width:= max(aSettings.Width.Value, MINIMUM_GRID_COLUMN_WIDTH);
     if aSettings.SortOrder.NotNull then
  -    aColumn.Index := aSettings.SortOrder.Value;
  +    aColumn.Index := min(aSettings.SortOrder.Value, Self.Columns.Count - 1);
   end;
   
   procedure TmDBGrid.ExtractSettingsFromField(aColumn: TColumn; aSettings: TmGridColumnSettings);
  
positive.code: 
  procedure TmDBGrid.ApplySettings(aSettings: TmGridColumnsSettings);
  var
    op : TmGridColumnSettings;
    i : integer;
    tmpList : TObjectList;
  begin
    tmpList := TObjectList.Create(false);
    try
      for i := 0 to Self.Columns.Count - 1 do
      begin
        tmpList.Add(Self.Columns.Items[i]);
      end;
      for i := 0 to tmpList.Count - 1 do
      begin
        if not IsSystemField ((tmpList.Items[i] as TColumn).Field) then
        begin
          op := aSettings.GetSettingsForField((tmpList.Items[i] as TColumn).FieldName);
          if Assigned(op) then
            ApplySettingsToField(tmpList.Items[i] as TColumn, op);
        end;
      end;
    finally
      tmpList.Free;
    end;
  end;
  
  
negative.code:   db, Classes, DBGrids, StdCtrls, Graphics, Forms, Controls, Menus, Math, contnrs, variants, Grids, ExtCtrls,
    mGridColumnSettings, mXML, mSortConditions, mGridIcons,
    mDatasetInterfaces, mSystemColumns, mFilter, mFilterOperators, mCellDecorations,
    mSummary, KAParser, mMaps;
  
  resourcestring
    SFilterValuesMenuCaption = 'Filter by value...';
  