cxgrid:ApplyBestFit jerking

时间:2016-07-15 11:47:53

标签: delphi devexpress tcxgrid

我运行此查询:

globe.focus = function(d, k) { d3.selectAll('.globe').transition()
  .duration(2000)
  .tween("transform", function() {
    var centroid = d3.geo.centroid(d);
    var r = d3.interpolate(projection.rotate(), [-centroid[0], -centroid[1], 0]);
     return function(t) {
        //projection.rotate(r(t));
         pathG.selectAll("path").attr("d", path);
         var clipExtent = projection.clipExtent();
        //projection.scale(1).translate([0, 0]).clipExtent(null);
        //var b = path.bounds(d);
        var minScale = 270,
        maxScale = minScale * 5;
        projection.rotate(r(t)).scale(Math.max(minScale, Math.min(maxScale, k)))
          .translate([width / 2, height / 2])
          .clipExtent(clipExtent);
         }
  });

然而,当查询显示在网格中时,我注意到,一瞬间,列会正常显示,然后应用最佳拟合。 看起来像某种混蛋。

现在,我不知道这种行为是设计还是我在适当的地方应用了这种行为。我该怎么做才能避免这种情况?

由于Uli的建议,这似乎有所改善:

procedure TForm1.cxButton1Click(Sender: TObject);
begin
cxGrid1DBTableView1.ClearItems;
DataModule2.ACRQuery1.Close;
DataModule2.ACRQuery1.SQL.Clear;
DataModule2.ACRQuery1.SQL.Text := ADVMemo1.Lines.Text;
AdvMemo1.UpdateWrap();
try
 DataModule2.ACRQuery1.Open;
 except
   on E:Exception do
   begin
     MessageDlg('Napaka pri izvedbi : ' + E.ClassName,
                mtError, [mbOK], 0);
   end;
   end;
 cxGrid1DBTableView1.DataController.CreateAllItems;
 cxGrid1DBTableView1.ApplyBestFit();
end;

1 个答案:

答案 0 :(得分:3)

尝试添加BeginUpdate / EndUpdate对。

相关问题