jQWidgets Forums

jQuery UI Widgets Forums Grid Does root property of dataadpater not work when using mvvm datatype : “observablearray”?

This topic contains 0 replies, has 1 voice, and was last updated by  delebash 12 years, 3 months ago.

Viewing 1 post (of 1 total)
  • Author

  • delebash
    Participant

    Compare two sources the first works the second doesn’t

    First source
    var source = {
    datatype : "observablearray",
    datafields : [{
    name : "__KEY"
    }, {
    name : "__STAMP"
    }, {
    name : "ID"
    }, {
    name : "firstName"
    }, {
    name : "middleName"
    }, {
    name : "lastName"
    }, {
    name : "ContactType",
    map : 'ContactType>name'
    }],
    id : '__KEY',
    localdata : model.items.peek().__ENTITIES
    }

    Second source

    var source = {
    datatype : "observablearray",
    datafields : [{
    name : "__KEY"
    }, {
    name : "__STAMP"
    }, {
    name : "ID"
    }, {
    name : "firstName"
    }, {
    name : "middleName"
    }, {
    name : "lastName"
    }, {
    name : "ContactType",
    map : 'ContactType>name'
    }],
    id : '__KEY',
    root : '__ENTITIES',
    localdata : model.items
    }

    Please see this fiddle for working example, then change localdata : model.items.peek()._ENTITIES to localdata : model.items and add root : ‘__ENTITIES’, I thought that this should have the same results?

    Thanks,
    Dan

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.