Results 1 to 5 of 5

Thread: How to bind textfield to store

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha Premium Member darwin_e's Avatar
    Join Date
    Nov 2012
    Posts
    10
    Vote Rating
    0
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    You will need to extend Text field or make a plugin as there is no built in support for this.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha - Documentation Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,162
    Answers
    501
    Vote Rating
    257
      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
    361
    Answers
    5
    Vote Rating
    16
      0  

    Default

    Use combo and hide trigger.
    varsos

  5. #5
    Sencha User
    Join Date
    May 2007
    Posts
    1
    Vote Rating
    0
      0  

    Default

    Bind fields value in the beforeload event.

Posting Permissions

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