Tcxgrid does not display all rows of TObjectDataSet when paging down in the grid

Issue #111 closed
Former user created an issue

Hi,

I'm just trying spring4d's new Persistence part and using its TObjectDataSet class.

So I just retrieved some datasets witch a firedac db2 connection using the following code:

type
  TDM = class(TDataModule)
    dsTodoListe: TDataSource;
  private
    FConnection: IDBConnection;
    FSession: TSession;
    FqryTodoListe: TObjectDataSet;
    FToDoList: IList<TToDoVO>;

  public

  end;

// ...

procedure TDM.Initialize;
begin
  FConnection := TConnectionFactory.GetInstance(dtFireDAC, ADConnection1);
  FSession := TSession.Create(FConnection);
  aToDoCQ := FSession.CreateCriteria<TToDoVO>;

  FToDoList := aToDoCQ.ToList;
  FqryTodoListe := TObjectDataSet.Create(Self);
  FqryTodoListe.ColumnAttributeClass := ColumnFieldDefAttribute;
  FqryTodoListe.DataList := FToDoList as IObjectList;

  dsTodoListe.DataSet := FqryTodoListe;

  FqryTodoListe.Open;
  FqryTodoListe.Last;
end;

In my main Form, I've connected a TcxGrid to the DataSource dsTodoListe.

Right after I execute the Initialize method, I can see all rows in the grid and it seems, that everything works fine. But when I browse through the grid with PageDown, for example, I see only the first and the last row!

If I use cxGridDBTableView1.DataController.DataModeController.GridMode = True, then all rows are shown...

What could be the reason for this behaviour? Am I doing something wrong?

Does the DataEvent Part of TObjectDataSet send all necessary dataevents to the Grid?

Comments (8)

  1. Stefan Glienke repo owner

    I cannot reproduce the error with DevExpress 14.2.6 and a TObjectDataset where i add a list of 100 objects. Scrolling works fine as well as sorting and filtering.

    Please provide a full example to show the error - preferably without dependency on a DB2 database.

  2. Cesar Romero

    FYI I have been using ObjectDataSet with cxGrid for almost a year without notice the described behaviour.

  3. Log in to comment