1. #551
    Ext User
    Join Date
    May 2010
    Location
    india Bangalore
    Posts
    186
    Vote Rating
    0
    mayurid is on a distinguished road

      0  

    Default


    Quote Originally Posted by jsakalos View Post
    RF always works with just one record that is saved as the instance variable, thus, you can access it as this.record.
    2. You could define combo for the column in the grid but you would set editable:false in the column config so that RF gets the editor but you cannot edit directly in the grid.
    how do i process it further i mean how should i send it to server i am not getting
    Code:
     Ext.override(Ext.ux.grid.RecordForm,{
        onOK:function() { 
        var record=this.record;
        //alert(record.length);
        var data=[];
        Ext.each(record, function(r, i) {
                var o = r.getChanges();//IS THIS CORRECT?
                
                })
                data.push(o);
            //alert(record);
    //this.afterUpdateRecord(this.record);
            Ext.Ajax.request({
                             url:'service_valid.php?task=update', //php function that saves the data
                             params: { data:Ext.encode(data)  },//--->NOT WORKING
                             success : function() {
                                            // alert(" Data modified successfully  !");
                              },
                            failure : function() {
                            Ext.Msg.show({
                            title : ' Error prompt  ',
                            msg : ' Modify the data has errors, the operation will be rolled back  !',
                            buttons : Ext.Msg.OK,
                            icon : Ext.Msg.ERROR
                                         });
                                                }
                            });
            
                        }
    });
    mayuri

  2. #552
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,518
    Vote Rating
    376
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Take a look at ext editable grid. You can have autoSave on store false plus a save button or you can have autoSave on store true. This is not a specific RF thing but a general grid saving technique.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  3. #553
    Ext User
    Join Date
    May 2010
    Location
    india Bangalore
    Posts
    186
    Vote Rating
    0
    mayurid is on a distinguished road

      0  

    Default


    Quote Originally Posted by jsakalos View Post
    Take a look at ext editable grid. You can have autoSave on store false plus a save button or you can have autoSave on store true. This is not a specific RF thing but a general grid saving technique.
    i dint get u,do you mean i should not override on ok????
    my issue is that i want to save the edited record using the ok button that comes in form.so i overrided the onOK function,but how should i get the values that are updated that i am not getting,and how to pass the updated record i.e this.record, as u earlier mentioned..the below is not working.please give a brief idea..i am new to ext.
    HTML Code:
    Ext.override(Ext.ux.grid.RecordForm,{
        onOK:function() {
            
        var record=this.record;
            /*var data = [];
            data.push(this.record);*/
            Ext.Ajax.request({
                             url:'service_valid.php?task=update', method:'post',//php function that saves the data
                             params: { data:Ext.encode(record)  },
                             success : function() {
       // alert(" Data modified successfully  !"); 
                              },
                            failure : function() {
                            Ext.Msg.show({
                            title : ' Error prompt',
                            msg : ' Modify the data has errors, the operation will be rolled back  !',
                            buttons : Ext.Msg.OK,
                            icon : Ext.Msg.ERROR
                                         });
      }
                            });
      }
    });
    mayuri

  4. #554
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,518
    Vote Rating
    376
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    onOK is not a public function so you should not touch it unless you exactly know what you are doing. Be you, I'd first setup a basic editable grid that is capable of reading and saving data from/to the server and then I'd add RF to this working grid.

    Also, your attempt to save a record manually is re-inventing the wheel because 3.x stores have autoSave config option so they save updated record to the server automatically.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  5. #555
    Ext User
    Join Date
    May 2010
    Location
    india Bangalore
    Posts
    186
    Vote Rating
    0
    mayurid is on a distinguished road

      0  

    Default


    is it possible to have all the fields in the record form that are present in the server(db) but not in the grid,for example:my grid contains only five rows i.e i want grid to have only 5 rows,but in the database i have ten fields.?
    mayuri

  6. #556
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,518
    Vote Rating
    376
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Yes, RF adds all fields from the store by default.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  7. #557
    Ext User
    Join Date
    May 2010
    Location
    india Bangalore
    Posts
    186
    Vote Rating
    0
    mayurid is on a distinguished road

      0  

    Default


    Quote Originally Posted by jsakalos View Post
    Yes, RF adds all fields from the store by default.
    k,but i don't want to load all the fields in store,i want to call them on edit only.
    mayuri

  8. #558
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,518
    Vote Rating
    376
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    So you'll have them in the store but not in the column model.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  9. #559
    Ext User
    Join Date
    May 2010
    Location
    india Bangalore
    Posts
    186
    Vote Rating
    0
    mayurid is on a distinguished road

      0  

    Default


    Quote Originally Posted by jsakalos View Post
    So you'll have them in the store but not in the column model.
    i don't want to load the store with all the fields initially
    The reason why i don't want to load all fields in store is because the time taken is more to load the all records.
    mayuri

  10. #560
    Ext User
    Join Date
    Jun 2008
    Posts
    2
    Vote Rating
    0
    towanime is on a distinguished road

      0  

    Exclamation setValue() problem

    setValue() problem


    Hi, excellent plugin but I've found a weird issue when I try to change one of the properties of a textfield (allowBlank etc) or execute a method (setValue, isValid etc) I don't get the usual behavior. For example I use setValue from a blur event of another field, code:

    These fields are create before the column model and then they are assigned to they columns as editors...
    Code:
     
          var txtCalle = new Ext.form.TextField({
                            allowBlank: false
                          , inputType: 'text'
                          , listeners:{
                            blur: function ( textField ){
                                    txtAvenida.allowBlank = true;
                                    txtAvenida.validate();
                            }
                          }
                     });
    
          var txtAvenida = new Ext.form.TextField({
                            allowBlank: false
                          , inputType: 'text'
                          , listeners:{
                            blur: function ( textField ){
                                    txtCalle.allowBlank = true;
                                    txtCalle.validate();
                            }
                          }
                     });
    The same happens with other validations that i need to check and I do either on blur or select... If I use setValue and print the object using firebug, the object seems to have the new value but it keeps showing the old value.

    Somehow the items are not re-rendering as they should or something I don't get to see is happening. I'm using vr 2.3.0.

    Please any help you can give me is appreciated.

Thread Participants: 97

  1. franklt69 (1 Post)
  2. Wolfgang (1 Post)
  3. mystix (1 Post)
  4. cobnet (8 Posts)
  5. chiphi13 (4 Posts)
  6. mike1993 (1 Post)
  7. violinista (1 Post)
  8. hui2008 (4 Posts)
  9. AlxH (12 Posts)
  10. oracio (1 Post)
  11. CINUE (2 Posts)
  12. phpcoder (3 Posts)
  13. ostghost (2 Posts)
  14. tdikarim (4 Posts)
  15. lkasdorf (3 Posts)
  16. derf (1 Post)
  17. mjlecomte (11 Posts)
  18. farracha (1 Post)
  19. jcwatson11 (2 Posts)
  20. robin30 (8 Posts)
  21. bluesapphire (1 Post)
  22. wm003 (1 Post)
  23. divxer (1 Post)
  24. escalade (2 Posts)
  25. boonkerz (5 Posts)
  26. JamesC (2 Posts)
  27. neenhouse (5 Posts)
  28. mask_hot (18 Posts)
  29. concep86 (2 Posts)
  30. sinma (2 Posts)
  31. kai5263499 (2 Posts)
  32. jcmartinez (1 Post)
  33. trak (1 Post)
  34. amit.shukld (1 Post)
  35. hsurya (1 Post)
  36. richgoldmd (1 Post)
  37. loic (7 Posts)
  38. jimpa911 (1 Post)
  39. chalu (3 Posts)
  40. damian79 (1 Post)
  41. jimkan (6 Posts)
  42. jahong (7 Posts)
  43. winnel (1 Post)
  44. joku (1 Post)
  45. josephf (2 Posts)
  46. indrajit_bin_rahwana (4 Posts)
  47. nojutsu (2 Posts)
  48. pokerking400 (15 Posts)
  49. georgiosleon (2 Posts)
  50. snilson (2 Posts)
  51. nightowl (1 Post)
  52. gthe (1 Post)
  53. descheret (1 Post)
  54. nebbian (2 Posts)
  55. se7en.hu (1 Post)
  56. towanime (2 Posts)
  57. pravidya (4 Posts)
  58. cnagel (2 Posts)
  59. extnam01 (2 Posts)
  60. Rothariger (6 Posts)
  61. dsmaevich (1 Post)
  62. uidtest (2 Posts)
  63. savant (4 Posts)
  64. aserron (1 Post)
  65. skaue (1 Post)
  66. ielektronick (1 Post)
  67. kalpan (4 Posts)
  68. jasonb885 (2 Posts)
  69. wemerson.januario (1 Post)
  70. extjs_new (23 Posts)
  71. Dumas (24 Posts)
  72. m.natarajan (1 Post)
  73. MrEnirO (4 Posts)
  74. jove76 (2 Posts)
  75. CircleCode (3 Posts)
  76. mdimino (7 Posts)
  77. flinz (2 Posts)
  78. vince (2 Posts)
  79. jmaldini (5 Posts)
  80. mixer80 (1 Post)
  81. prox00 (1 Post)
  82. macdoug1 (14 Posts)
  83. return1.at (8 Posts)
  84. islabucasgrande (1 Post)
  85. big (1 Post)
  86. NicP (9 Posts)
  87. taron133 (1 Post)
  88. araiczyk (1 Post)
  89. adhoul (1 Post)
  90. mayurid (9 Posts)
  91. Kalpit (10 Posts)
  92. bizcatalyst (1 Post)
  93. Manuelbond007 (2 Posts)
  94. nasargus (1 Post)
  95. shahab_et (1 Post)
  96. stevwinata (5 Posts)
  97. tomdchi (2 Posts)