TMemTableEh 过滤中文的bug,作者给我回复了,意思是:如果字段类型是nvarchar ,也就是unicode类型就没问题; 我又跟他说,在ehlib早期版本就没有这个问题,不过那时候还没有dlephi2010;因为delphi2010做了大量的unicode处理,所以作者这块可能还有问题;对于这个问题, http://www.daizhicun.com/dmx/pic/showRecNo.jpg 我的修正方法是:修改SetColumnAttributes过程;procedure TCustomDBGridEh.SetColumnAttributes;var I: Integer; NewWidth: Integer;begin if RowPanel then begin ColWidths[FIndicatorOffset] := FGridMasterCellWidth; for I := 1 to FColumns.Count - 1 do ColWidths[I + FIndicatorOffset] := iif(dgColLines in Options, -1, 0); end else for I := 0 to FColumns.Count - 1 do with FColumns do begin TabStops[I + FIndicatorOffset] := IsTabStop; NewWidth := iif(Visible, Width, iif(dgColLines in Options, -1, 0)); if NewWidth <> ColWidths[I + FIndicatorOffset] then ColWidths[I + FIndicatorOffset] := NewWidth; end; //=======add by daizhcun at 2010.3.14 begin ========== // delete { if IndicatorColVisible then ColWidths[0] := CalcIndicatorColWidth;} //add if IndicatorColVisible and Assigned(FColumns.FGrid.DataSource) and Assigned(FColumns.FGrid.DataSource.Dataset) and (FColumns.FGrid.DataSource.Dataset.Active) and (dghShowRecNo in OptionsEh) then ColWidths[0] := IndicatorWidth + 4 + Canvas.TextWidth (IntToStr(FColumns.FGrid.DataSource.Dataset.RecordCount)) else ColWidths[0] := IndicatorWidth; //=======add by daizhcun at 2010.3.14 end ==========end;