Results 1 to 2 of 2

Thread: Quesiton on viewConfig on grids

  1. #1
    Sencha Premium Member
    Join Date
    Oct 2013
    Posts
    46
    Answers
    3

    Default Quesiton on viewConfig on grids

    Is 'viewConfig' a valid property for grids? It's not a valid option in Architect 3, so I added it manually.

    I want to preserve the scroll on a REST backed grid with a cell/row editor plugin. Currently when I update a record, it snaps back to the top. You can duplicate this behavior using the rest proxy example here after adding many items: http://docs.sencha.com/extjs/4.2.2/e...l/restful.html

    Searching the forums shows me I should add this "preserveScrollOnRefresh" property to viewConfig, but it's still snapping to the top. I added it everywhere:

    Code:
            Ext.applyIf(me, {            viewConfig: {
                    preserveScrollOnRefresh: true
                },
                lockedGridConfig: {
                    preserveScrollOnRefresh: true
                },
                lockedViewConfig: {
                    preserveScrollOnRefresh: true
                },
                normalGridConfig: {
                    preserveScrollOnRefresh: true
                },
                normalViewConfig: {
                    preserveScrollOnRefresh: true
                },
    But it still scrolls to the top after a save. Any suggestions?

  2. #2
    Sencha Premium Member
    Join Date
    Oct 2013
    Posts
    46
    Answers
    3

    Default

    Ok, the reason was when I added a custom viewConfig property, it was overidden by the same viewConfig property when I specified an itemId.

    Screenshot at Nov 21 17-49-40.png

    The first viewConfig property I have is considered a custom property:

    Screenshot at Nov 21 17-49-07.png

    To get around this I had to delete the itemId, which removes the Architect generated viewConfig property. This is okay for now, but how do I stick the preserveScrollOnRefresh property int he Architect Generated viewConfig object?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •