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
    37,645
    Vote Rating
    899
    Answers
    3574
    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
    6,062
    Vote Rating
    215
    Answers
    486
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      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
    Vote Rating
    16
    Answers
    4
    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.