1. #1
    Ext User
    Join Date
    Jul 2010
    Posts
    6
    Vote Rating
    0
    Huevoos is on a distinguished road

      0  

    Thumbs up [SOLVED] Getting the Form Field using Row Edit

    [SOLVED] Getting the Form Field using Row Edit


    Hello, I'm trying to change the value of some fields according to the value of one in row edit mode.

    I've attached the change event to the field in question, but I can't figure out how to change the value of the other fields, right now I have:

    Code:
                                        edField.on('change', function(){                                                
                                            var ed = this.editor;
                                            var rec = this.Store.getAt(ed.rowIndex);
                                            rec.beginEdit();
                                            rec.set('col', 'New Value');
                                            rec.set('col2', 'New Value');
                                            rec.endEdit();
                                            rec.commit();
                                        }.createDelegate(this));
    That changes the value on the grid, after I cancel the edit, but not on the editor field, I've searched the documentation and can't find how to get the form Field.

    Thanks for your help.
    Last edited by Huevoos; 29 Jul 2010 at 7:30 AM. Reason: SOLVED

  2. #2
    Ext User
    Join Date
    Jul 2010
    Posts
    6
    Vote Rating
    0
    Huevoos is on a distinguished road

      0  

    Default


    Bump <- is this accepted here?

  3. #3
    Ext User
    Join Date
    Jul 2010
    Posts
    6
    Vote Rating
    0
    Huevoos is on a distinguished road

      0  

    Default


    Finally, after many, many, many unsuccessful attempts I found my answer.

    RowEdit has a property items which holds all the fields in the row, from there it was just a matter of iterating through them:

    Code:
                                    edField.on('change', function(){                                                
                                            var items = this.editor.items;
                                            items.each(function(it){
                                                switch(it.column.dataIndex){
                                                    case 'col':
                                                        it.setValue('New  Value 1');
                                                    break;
                                                    case 'col2':
                                                        it.setValue('New  Value 2');
                                                    break;
                                                };
                                            
                                            });
    Maybe this will help someone in a similar situation

Similar Threads

  1. Can we edit form field labels in GXT like we can with ExtJS?
    By Jeff31UK in forum Ext GWT: Discussion
    Replies: 2
    Last Post: 1 Mar 2010, 7:47 AM
  2. Replies: 4
    Last Post: 18 May 2009, 6:37 AM
  3. How to add a row to editorgrid field in form
    By GokhanNL in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 7 Aug 2008, 11:59 PM
  4. Replies: 0
    Last Post: 28 Jul 2007, 6:27 AM

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi