Announcement

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

    Get an empty clientOnly DataSource

    I'm looking into using the DataSource::getClientOnlyDataSource(criteria, callback) API and was wondering if there's a way to grab a copy of our (real) datasource without doing a fetch. I see that if I pass in a null Criteria it will do a fetch across all data that the (real) datasource is pointing to. I am trying to initialize an empty editable grid and would like to avoid a useless fetch (something returning nothing but still creating a request) if possible.
    This is SmartGWT 6.1p

    #2
    If you already have the data in a grid for example, you can make a clientOnly DataSource from that via just creating a clientOnly DataSource and providing the data. But that's pretty obvious, so we're guessing we may not understand the gist of your question..

    Perhaps you didn't realize that you can re-use the fields definition of your existing DataSource via just setting DataSource.inheritsFrom in a new clientOnly DataSource?

    Comment

    Working...
    X