Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    how to make a grid record selection of newly added record

    We have a listGrid and a DynamicForm which each have the same datasource.

    DataSource ds = DataSource.get("dataSourceDS");
    listGrid.setDataSource(ds);
    dynamicForm.setDataSource(ds);

    When a new record is created and saved from the dynamicForm to the database, the listGrid does a fetch of the data and displays it. OK.

    The problem is that we want to select the newly added record in the list grid. However, we are not able to do this because we cannot select the record until the grid is loaded and the data fetched displayed.

    We have tried the onDataArrived callback, but this callback executes before the data is actually rendered.

    So how can we know when the listgrid renders the data so that the selectRecord(newlyAddedRecord) will work?

    #2
    Selecting a record from the DataArrived event is a technique we use all the time and is known to work. You must be doing something more or different. Please make another attempt to describe the scenario, or post runnable code that we can try out to see the effect.

    Comment


      #3
      Yes, you are most correct...I mangled something and caused the onDataArrivedEventHandler not to fire correctly...

      Thanks, for setting me back on the right path. By confirming that it should work, I started looking more critically at the other code.

      thanks,
      Richard

      Comment

      Working...
      X