Results 1 to 2 of 2

Thread: Data Binding: Disable Button when Store in a Grid is loading

  1. #1
    Sencha User
    Join Date
    Dec 2010
    Posts
    79

    Default Data Binding: Disable Button when Store in a Grid is loading

    Hi,

    I'm a bit confused about data bindings and my problem might not be solvable with data bindings, but here's my question anyways:

    Is it possible to disable a grid's toolbar button while the store is loading? If so, how?

    I tried different configurations, but none of them seem to work and data bindings are tough to debug…

    Thanks
    Felicitus

  2. #2
    chramer's Avatar
    Join Date
    Feb 2011
    Location
    Chisinau, Moldova
    Posts
    316
    Answers
    64

    Default

    Yes, it's possible. You must have your store declaration in the view model
    Code:
    viewModel: {
        stores: {
            gridStore: {
                type: 'gridstore',
                autoLoad: true
            }
        }
    }
    and then you can bind the "disabled" config of the buttons to the "loading" property of the store.
    Code:
    text: 'Reload',
    bind: {
        disabled: '{gridStore.loading}'
    },
    handler: function () {
        grid.getStore().load();
    }
    Here is the fiddle: https://fiddle.sencha.com/#view/editor&fiddle/20tc

Similar Threads

  1. Replies: 2
    Last Post: 15 Apr 2015, 7:39 AM
  2. Using xtype for grid/store/paging toolbar breaks data binding [SOLVED]
    By Screamy in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 25 Sep 2010, 11:16 AM
  3. Binding data view (grid etc) to results of store query
    By robmonie in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 19 Apr 2010, 2:06 AM
  4. Grid Store Data binding
    By bartolomiew in forum Ext GWT: Discussion
    Replies: 5
    Last Post: 14 Feb 2010, 6:36 PM

Posting Permissions

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