Announcement

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

    Delphi DBNavigator-like component

    To easy migration for my users, I was requested to create a feature just like Delphi DBNavigator component.

    In a nutshell, DBNavigator is a component which is attached to a Delphi datasource which has some buttons to move the datasource cursor (previous, next, etc). When the cursor is moved then all components which are bound to this datasource now shows data from the record pointed by the cursor.

    I'm wondering if I can have something like that on SmartGWT, since it seems there is no cursor on its datasource. Is there any feature like that? Could you please point me some directions?

    Thanks,
    Matheus

    #2
    What's the difference between that and a ListGrid with a DataSource where pressing a button selects the next record?

    Comment


      #3
      Hi,Isomorphic! Thanks for the response!

      The point is exactly that it would require a listgrid to move between the records. Some cases I just don't want to display a grid, just a form and a way to scroll the records. So I think it would be good if the datasource could have a way to know its current position in this retrieved record set. This would allow the addition of some operations like previous, next, last, etc, enabling the creation of the navigator component I have told in my previous message. When this cursor scrolls, automatically all components bound to it would be updated to reflect the new cursor (for example, the fields of a form or the selected record of a grid). No need to call form.editRecord(grid.getSelectedRecord()) anymore (until because there is no grid!)

      Of course I could simulate this with a hidden listgrid, but I wanted to know if there is a better way to do that. Or even know you opinion about that approach. Does that sounds reasonable?

      Matheus

      PS.: Actually I work for two Brazilian government organizations which are considering using smartgwt to migrate desktop apps to our intranet. My job is trying to simulate some of its features to look similar both to our users and especially for our developers, just used to "Delphi way" to do program (here in Brazil Delphi is spread as plague).

      Comment


        #4
        If you don't want a visible component showing the records, use a ResultSet instead. It's a non-visual component that tracks a set of records that may be partially loaded. To go one record at a time, turn off fetch-ahead.

        Comment

        Working...
        X