1. #1
    Ext JS Premium Member rizakoyt's Avatar
    Join Date
    Mar 2007
    Posts
    23
    Vote Rating
    0
    rizakoyt is on a distinguished road

      0  

    Default binding.js with 1.0

    binding.js with 1.0


    Are there plans to put the binding.js into the 1.0 version? Or am I overlooking a new way of binding the record to a form, and updateing the grid when the form is updated?

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,185
    Vote Rating
    63
    aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice

      0  

    Default


    Binding grid data to a form:

    Listen to the 'rowselect' event of your selection model:
    sm.on('rowselect', this.bindData, this, true);

    My bindData function looks like so:
    bindData : function(sm, rowIdx){
    /* retrieve the current row from the data store */
    var currRow = ds.getAt(rowIdx);
    /* update form elements */
    Ext.fly('book-title-form').dom.value = currRow.get('TITLE');
    Ext.fly('book-isbn-form').dom.value = currRow.get('ISBN');
    Ext.fly('book-keywords-form').dom.value = currRow.get('KEYWORDS');
    Ext.fly('book-description-form').dom.value = currRow.get('DESCRIPTION');
    }

    As far as the data marshalling is concerned and sending updates to a server-side component this is something that Jack is currently working on and something that I know I am looking forward to a lot.

Similar Threads

  1. Exploring Client-Side Cross Browser XML Data-Binding
    By genius551v in forum Ext 1.x: Help & Discussion
    Replies: 10
    Last Post: 5 Jan 2007, 8:41 AM
  2. strange problem in data binding after upgrade
    By qiuyl in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 20 Dec 2006, 6:00 PM