Jump to content


Toofar

Member Since 05 May 2016
Offline Last Active May 05 2016 03:59 PM
-----

Topics I've Started

Data constant update

05 May 2016 - 12:11 PM

Hi,

 

I'm trying to constantly update a nextgrid from a trading source (opened positions) and fail to achieve this.

Could you please advice the best way to do that?

//____________________________________
//
//    EVENTS ROW CHANGED
//_____________________________________
procedure TfCore.TradeDeskEventsSink1RowChanged(ASender: TObject;
  const pTableDisp: IDispatch; const sRowID: WideString);
var
    Count_ , trowcount, tcolcount: Integer;
begin
//data processing for Row Changed Events
    application.ProcessMessages;

 ....here some code to get the data


    nxtrades.ClearRows;
    nxtrades.AddRow;
     for irow := 1 to tRowCount do
          begin
          Nxtrades.Cell[nxtradeid.index,nxtrades.lastaddedrow].asstring := toRows.Item(irow).TradeID;
          Nxtrades.Cell[nxAccountID.index,nxtrades.lastaddedrow].asstring := toRows.Item(irow).AccountID;
          end;
end;