1. #131
    Sencha User
    Join Date
    Jul 2008
    Location
    Brooklyn NY
    Posts
    120
    Vote Rating
    0
    tBSTAR is on a distinguished road

      0  

    Default


    Thanks wayne_o, I am facing a problem with the GroupSummary. I don't if you can help but this is my problem: I have a column set as string so I can return multiple dollard amounts like this: 60.00~26.25. and I parse this text when I render the column.

    Code:
    { header: 'Group/RC-Amt',dataIndex: 'AdjustmentMonetaryAmount',
           renderer: function(v, params, record){
                                            
                           var str;
                        if(!String.IsNullOrEmpty(record.data.AdjustmentMonetaryAmount))
                        {
                            if (record.data.AdjustmentMonetaryAmount.indexOf("~")>=0)
                            {
                                var col_array = record.data.AdjustmentMonetaryAmount.split("~");                  
                                for (i=0;i<=col_array.length-1;i++)
                                {
                                    col_array[i] = Ext.util.Format.usMoney(col_array[i]) + '<br/>';
                                }
                                str = col_array.join("");
                            }
                            else { str = Ext.util.Format.usMoney(record.data.AdjustmentMonetaryAmount); }
                        }
                        return str;
                    }, summaryType:'GrpAmt'
          }
    So this works, one row with multiline amount. The result is:
    $60.00
    $26.25
    Great. But when it comes to the summary I do this:


    Code:
        Ext.grid.GroupSummary.Calculations['GrpAmt'] = function(v, record, field){                       
                           
                           var sum;
                        if(!String.IsNullOrEmpty(record.data.AdjustmentMonetaryAmount))
                        {
                            if (record.data.AdjustmentMonetaryAmount.indexOf("~")>=0)
                            {
                                var col_array = record.data.AdjustmentMonetaryAmount.split("~");                  
                                var sum = parseFloat(col_array[0]);
                                for (i=1;i<=col_array.length-1;i++)
                                {
                                    sum = sum + (parseFloat(col_array[i]));
                                }
                                alert(sum);
                            }
                            else { sum = record.data.AdjustmentMonetaryAmount; }
                        }
                        return Ext.util.Format.usMoney(sum.toString());
        }
    I tried every possible combination and I still get $Nan.00 no matter what I do. But the funny thing when I view the variables, they hold the right totals and yet, they can't be shown on the grid. I suspect this to happen because the record in the reader is declared as this:

    Code:
    {name: 'AdjustmentMonetaryAmount', type: 'string', mapping: 'AdjustmentMonetaryAmount'},

    Any help would be greatly appreciated.

    Thanks

  2. #132
    Sencha User
    Join Date
    Jul 2008
    Location
    Brooklyn NY
    Posts
    120
    Vote Rating
    0
    tBSTAR is on a distinguished road

      0  

    Default


    I found out that removing Ext.util.Format.usMoney fixed my problem because the field has a string type.
    Code:
    return Ext.util.Format.usMoney(sum.toString());
    I am still looking for something like the rowExpander plugin but it has to be for the grouped items not per row.
    In another words, I I will display additional text below the totals (GroupSummary) as one row and not per cell.

    Any help will be appreciated.

    Thanks

  3. #133
    Sencha User galdaka's Avatar
    Join Date
    Mar 2007
    Location
    Spain
    Posts
    1,166
    Vote Rating
    -1
    galdaka is an unknown quantity at this point

      0  

    Default


    Quote Originally Posted by wayne_o View Post
    Nope - you need to use the MultiGroupSummary extension - as far as I know.

    This is because the doGroupEnd method is implemented incrrectly.

    I have a version which allows multi level grouping and multigroup summaries - I'll upload the code later today if I get the chance - it's not fully tested etc but it seems to be working for me.

    w://
    Where is the example?

    Greetings,

  4. #134
    Ext User wayne_o's Avatar
    Join Date
    Apr 2007
    Posts
    85
    Vote Rating
    0
    wayne_o is on a distinguished road

      0  

    Default Multigrouping with sumamries etc

    Multigrouping with sumamries etc


    Here you go...

    All of the related extensions - as they are in my system.

    It'd be great if we could develop this plugin/set of plugins as they provide EXCELLENT - near as damn it - ad hoc reporting!!

    [please rename the file to UploadToExt.rar before extracting ]

    w://
    Attached Files

  5. #135
    Ext User wayne_o's Avatar
    Join Date
    Apr 2007
    Posts
    85
    Vote Rating
    0
    wayne_o is on a distinguished road

      0  

    Default


    Quote Originally Posted by tBSTAR View Post
    I found out that removing Ext.util.Format.usMoney fixed my problem because the field has a string type.
    Code:
    return Ext.util.Format.usMoney(sum.toString());
    I am still looking for something like the rowExpander plugin but it has to be for the grouped items not per row.
    In another words, I I will display additional text below the totals (GroupSummary) as one row and not per cell.

    Any help will be appreciated.

    Thanks
    You should look at using VS2008 or Aptana for debugging JS - that would have been apparent imediately had you been able to step into the code

    w://

  6. #136
    Sencha User
    Join Date
    Jul 2008
    Location
    Brooklyn NY
    Posts
    120
    Vote Rating
    0
    tBSTAR is on a distinguished road

      0  

    Default


    I hear you bro, I found out the hard way. wayne_o do you happen to know how to add a group expander that takes up the whole row?

  7. #137
    Ext User
    Join Date
    Aug 2008
    Posts
    19
    Vote Rating
    0
    shankys_4u is on a distinguished road

      0  

    Default


    Recently, I have started using this MultiGrouping Grid. However I get an error - "Ext.ux.clone is not a function" in FireFox ..Please advise...

  8. #138
    Ext User wayne_o's Avatar
    Join Date
    Apr 2007
    Posts
    85
    Vote Rating
    0
    wayne_o is on a distinguished road

      0  

    Default


    Please make sure you have the deepclone function included in your scripts

    http://jaffa.cvs.sourceforge.net/vie...xtjs/ux/utils/

    w://

  9. #139
    Ext User wayne_o's Avatar
    Join Date
    Apr 2007
    Posts
    85
    Vote Rating
    0
    wayne_o is on a distinguished road

      0  

    Default


    Sorry for late replying...

    What do you mean about having the expander take up the whole row? My version - if I click anywhere on the expander row - it expands/contracts the group.

    W://

  10. #140
    Ext User
    Join Date
    Aug 2008
    Posts
    19
    Vote Rating
    0
    shankys_4u is on a distinguished road

      0  

    Default


    I have included the DeepClone file...but Still no luck :-( I get error - "Labels is not defined" .... I am using it as per instructions on http://www.jadacosta.es/extjs/exampl...ultiGroup.html Please let me know if I am still missing any files to include.

Thread Participants: 118

  1. galdaka (34 Posts)
  2. karimchebani (1 Post)
  3. mdissel (2 Posts)
  4. mystix (3 Posts)
  5. wayne_o (8 Posts)
  6. akannu (1 Post)
  7. tchitani (8 Posts)
  8. timmy (1 Post)
  9. dhenning23 (1 Post)
  10. DServe (1 Post)
  11. tdikarim (4 Posts)
  12. Nam (1 Post)
  13. ljkmchale (8 Posts)
  14. StaticVoidMain (2 Posts)
  15. sawan (1 Post)
  16. vicirst (1 Post)
  17. jaquet (1 Post)
  18. jerrybrown5 (4 Posts)
  19. ut_paule (10 Posts)
  20. nnextjs (1 Post)
  21. sergeiw (1 Post)
  22. st_gross (1 Post)
  23. emily (5 Posts)
  24. ENEMYoftheSUN (1 Post)
  25. smarttdv (1 Post)
  26. JDevloper (1 Post)
  27. Maharshi (2 Posts)
  28. pbuyle (2 Posts)
  29. cujo13 (2 Posts)
  30. johnstontrav (1 Post)
  31. Jack_S (8 Posts)
  32. DamienValentine (7 Posts)
  33. source78 (1 Post)
  34. cgs1999 (1 Post)
  35. Karmaresh (5 Posts)
  36. praveen.infra (2 Posts)
  37. pops (1 Post)
  38. mcouillard (2 Posts)
  39. maquejp (2 Posts)
  40. bvutukur (3 Posts)
  41. sim (2 Posts)
  42. tBSTAR (4 Posts)
  43. randymay (5 Posts)
  44. Rothariger (1 Post)
  45. shankys_4u (3 Posts)
  46. hpandey (1 Post)
  47. miha (3 Posts)
  48. wp.joju (4 Posts)
  49. oliverseitz (1 Post)
  50. tklever (1 Post)
  51. codingvista (3 Posts)
  52. iamdman (2 Posts)
  53. rene.klatt (1 Post)
  54. yrobla (1 Post)
  55. dmichael (1 Post)
  56. Helton Gon (1 Post)
  57. giovanni (2 Posts)
  58. nacha (1 Post)
  59. Tewr (2 Posts)
  60. snowy8781 (1 Post)
  61. rpnoble (1 Post)
  62. denyall (2 Posts)
  63. vladcd (3 Posts)
  64. rickonodera (1 Post)
  65. yyogev (21 Posts)
  66. daltonjorge (6 Posts)
  67. janasri (1 Post)
  68. dbojdo (1 Post)
  69. Azadi (1 Post)
  70. isit.gd (4 Posts)
  71. blackghost (3 Posts)
  72. dileep singhal (8 Posts)
  73. mrbeig9 (2 Posts)
  74. rupidas (1 Post)
  75. xiaofei (1 Post)
  76. extjsnewb (3 Posts)
  77. nestore2k (1 Post)
  78. TonyBones (2 Posts)
  79. Haron (1 Post)
  80. thorben (1 Post)
  81. amsoft (1 Post)
  82. paivajose (1 Post)
  83. Karthikeyan.rajmohan (1 Post)
  84. alexpotemkin (1 Post)
  85. cristinadelosa (1 Post)
  86. justusvm (4 Posts)
  87. Kunha (1 Post)
  88. rogerio.carrasqueira (1 Post)
  89. krishnaswamy (2 Posts)
  90. jdamani (1 Post)
  91. chavocarlos (2 Posts)
  92. raghuramgreddy (1 Post)
  93. garrythebest (1 Post)
  94. Komal Vaswani (1 Post)
  95. Hari1611 (3 Posts)
  96. sri_dev (1 Post)
  97. Ferny (1 Post)
  98. mosull2 (1 Post)
  99. Manjula (1 Post)
  100. roman.savko (2 Posts)
  101. grace.lawrence (3 Posts)
  102. leolox69 (5 Posts)
  103. fvchapa (1 Post)
  104. s.gatti (1 Post)
  105. ilmcon (1 Post)
  106. pardhu (1 Post)
  107. psianil9 (1 Post)
  108. Golden.Vulture (1 Post)
  109. tempvalue (1 Post)
  110. Venkatram64 (2 Posts)
  111. Vishnu C (1 Post)
  112. shrujan07 (2 Posts)
  113. raffyaslanbeily (1 Post)
  114. srautpyaa (1 Post)
  115. ocr (1 Post)
  116. henriquebotega (1 Post)
  117. rajkumargvrs (2 Posts)
  118. nobruds (1 Post)