1. #1
    Sencha Premium Member darwin_e's Avatar
    Join Date
    Nov 2012
    Posts
    10
    Vote Rating
    0
    darwin_e is on a distinguished road

      0  

    Default Unanswered: How to bind textfield to store

    Unanswered: How to bind textfield to store


    Hi,
    I am pretty much new to ext js and practically not an expert on JS. I've worked with windows forms for most of my project

    Anyway, i need to know the best approach of binding the text field to a store so that when i navigate through the store (using the pagingtoolbar), the field values gets displayed to.

    To give you a better idea, let me show you my form:
    12-13-2012 12-10-09 AM.png

    Thanks.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Answers
    3461
    Vote Rating
    827
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You will need to extend Text field or make a plugin as there is no built in support for this.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,893
    Answers
    366
    Vote Rating
    175
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    What if you set the pageSize on the store to 1 and then listened to the change event on the paging toolbar and used the page number to do something like:

    Code:
    change: function (tb, pageData) {
        var rec = tb.getStore().getAt(pagingData.toRecord);
        myForm.loadRecord(rec);
    }

  4. #4
    Sencha Premium Member varsos's Avatar
    Join Date
    Feb 2008
    Location
    Long Island, NY
    Posts
    342
    Answers
    4
    Vote Rating
    14
    varsos will become famous soon enough

      0  

    Default


    Use combo and hide trigger.
    varsos

  5. #5
    Sencha User
    Join Date
    May 2007
    Posts
    1
    Vote Rating
    0
    catstiger is on a distinguished road

      0  

    Default


    Bind fields value in the beforeload event.