View Poll Results: Was this helpful?

Voters
325. You may not vote on this poll
  • Yes - Very Much

    250 76.92%
  • Yes - Had to tweak it

    45 13.85%
  • No - Maybe

    14 4.31%
  • Not at All!!!

    16 4.92%
  1. #31
    Ext User
    Join Date
    Oct 2007
    Posts
    15
    Vote Rating
    0
    juljupy is on a distinguished road

      0  

    Default


    i wanna do this:

    Get the 'sum' result value to make another calculation, i got a math formula where i need that value and that formula i define it into another function.

    So how do i access to the 'sum' result value?

  2. #32
    Sencha - Community Support Team mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    4
    mystix will become famous soon enough

      0  

    Default


    Quote Originally Posted by juljupy View Post
    i wanna do this:

    Get the 'sum' result value to make another calculation, i got a math formula where i need that value and that formula i define it into another function.

    So how do i access to the 'sum' result value?
    as @SaJoshua has mentioned, you may manipulate the 'sum' value (or 'count' / 'max' / 'min' / 'average' values) via a custom summaryRenderer.

    add the following function to the included example
    Code:
    function squareIt(v, params, data) {
      return v? (Math.pow(v * 1000, 2) / Math.pow(1000, 2)) : '';
    }
    and add the following summaryRenderer to the column with the sum
    Code:
    {header: "Price", width: 75, sortable: true, renderer: 'usMoney', dataIndex: 'price', summaryType: 'sum', editor: new Ext.form.NumberField({allowDecimals: true}), summaryRenderer: squareIt},
    the summaryRenderer method is always passed 3 params:
    • v - the value computed by the column's respective summaryType function
    • params - the cell params css, id, style and value
    • data - computed data for all cells in the summary row

  3. #33
    Sencha - Community Support Team mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    4
    mystix will become famous soon enough

      0  

    Default


    Quote Originally Posted by saJoshua View Post
    I would really like to know if there is any chance that the summary could be on the entire datastore, not just the portion being rendered? Also, would it be possible to only aggregate on the store being loaded?
    the summary row already works on the entire store.

    check out this portion of the plugin (in particular, note the portion in bold)
    Code:
      refreshSummary : function() {
        var g = this.grid, ds = g.store;
        var cs = this.view.getColumnData();
        var rs = ds.getRange(); // get all records from the Store
        ....
        ...
      }
    i.e. if you're already pulling all required Records into your Store (in order to use the PagingMemoryProxy, for example), then the summary row will aggregate on the entire set of Records which are in the Store.

  4. #34
    Ext User
    Join Date
    Oct 2007
    Posts
    15
    Vote Rating
    0
    juljupy is on a distinguished road

      0  

    Default


    i understand what you tell but what i want is this:

    i need the summaryRender value, so i define another function outside

    function whatever(sumvalue) {
    var x = sumvalue + anothervalue or math function;
    return x;
    }
    where sumvalue is the summaryRender value passed to the function.

    this function i use it just to assign the whatever function result maybe into a Field Text.

    What i need is to pass the summaryRender value to the whatever function outside the gridpanel.
    Last edited by juljupy; 8 Feb 2008 at 7:11 AM. Reason: correction

  5. #35
    Sencha - Community Support Team mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    4
    mystix will become famous soon enough

      0  

    Default


    Quote Originally Posted by juljupy View Post
    What i need is to pass the summaryRender value to the whatever function outside the gridpanel.


    well just go ahead and stuff whatever() into the summaryRenderer then
    Code:
    summaryRenderer: function(v, params, data) {
      whatever(v);
      return v;
    }

  6. #36
    Ext User
    Join Date
    Oct 2007
    Posts
    15
    Vote Rating
    0
    juljupy is on a distinguished road

      0  

    Default


    thanks, it works it was so easy...

  7. #37
    Ext User
    Join Date
    Feb 2008
    Posts
    2
    Vote Rating
    0
    chrissturm is on a distinguished road

      0  

    Default


    Quote Originally Posted by mystix View Post
    Q.E.D.


    just fiddle with the CSS settings for the GridSummary row, do a forceFit on the GridPanel's viewConfig, and tweak your grid height a little. voila.
    Is there a way to do it without forceFit, and have a horizontal scrollbar below the summary line? Having the scrollbar between the grid and its summary can look confusing

  8. #38
    Sencha - Community Support Team mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    4
    mystix will become famous soon enough

      0  

    Default


    Quote Originally Posted by chrissturm View Post
    Is there a way to do it without forceFit,
    the forceFit config auto-sizes the columns, not the grid height.

    Quote Originally Posted by chrissturm View Post
    and have a horizontal scrollbar below the summary line?
    a non-locked grid summary row you mean?
    i.e. the grid summary row is always the last row in a grid, and scrolls along with the other grid rows?
    not this plugin.

    try searching for a 1.x plugin written by @rodiniz for the 1.x Ext.grid.Grid/EditorGrid.

    [edit]
    p.s. if it looks confusing, you could always jazz up the summary row via css (have a look at the css for this plugin)
    i.e. give it a shade of gray, bold the values etc:

  9. #39
    Ext User
    Join Date
    Feb 2008
    Posts
    2
    Vote Rating
    0
    chrissturm is on a distinguished road

      0  

    Default


    Quote Originally Posted by mystix View Post
    the forceFit config auto-sizes the columns, not the grid height.


    a non-locked grid summary row you mean?
    Well, no

    what i want is a *horizontal* scrollbar like in your initial example here:

    but i want the scrollbar below the summary line.
    (The scrollbar scrolls both the grid and the summary line, so its confusing when its between grid and summary line)

  10. #40
    Sencha - Community Support Team mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    4
    mystix will become famous soon enough

      0  

    Default


    Quote Originally Posted by chrissturm View Post
    Well, no

    what i want is a *horizontal* scrollbar like in your initial example here:
    but i want the scrollbar below the summary line.
    (The scrollbar scrolls both the grid and the summary line, so its confusing when its between grid and summary line)
    d'oh. insufficient

    well i guess it's possible if:
    • the plugin's syncSummaryScroll method is registered with the the summary container's scroll event instead of the GridPanel's
    • the summary container's height can be automagically increased/decreased to cater for the presence/absence of a horizontal scrollbar (plugin has to somehow detect if there's horizontal scrolling in the GridPanel)
    • again, the plugin somehow detects if there's horizontal scrolling in the GridPanel and removes the horizontal scrollbar (without also removing the vertical scrollbar) -- i think this may be achieved via css property overflow-x:hidden
    • the GridPanel's horizontal scroll is controlled by the summary row's horizontal scrollbar (if any)

    i won't be able to work on this for quite a while (already using the plugin in production), so you're welcome to make the mod

    just holler here if you do decide to try your hand at it.

Thread Participants: 132

  1. franklt69 (3 Posts)
  2. Condor (18 Posts)
  3. mapo (3 Posts)
  4. HarryC (1 Post)
  5. mystix (139 Posts)
  6. jared (1 Post)
  7. MaxT (1 Post)
  8. wayne_o (2 Posts)
  9. soreport (1 Post)
  10. violinista (1 Post)
  11. bloon (1 Post)
  12. Troy Wolf (1 Post)
  13. tobiu (1 Post)
  14. Deleter (3 Posts)
  15. sintax.era (2 Posts)
  16. chernomorez (1 Post)
  17. lychorojostone (2 Posts)
  18. 6epcepk (6 Posts)
  19. zaunaf (1 Post)
  20. SlashEMc2k (1 Post)
  21. americos (1 Post)
  22. Layne (1 Post)
  23. jamie.nicholson (1 Post)
  24. mscdex (1 Post)
  25. vnug (2 Posts)
  26. dima (3 Posts)
  27. froamer (3 Posts)
  28. mondomon (3 Posts)
  29. kenshin (1 Post)
  30. rtconner (2 Posts)
  31. juljupy (6 Posts)
  32. lukas.wappler (4 Posts)
  33. crpatrick (1 Post)
  34. saJoshua (7 Posts)
  35. crxtech (1 Post)
  36. vertigoMX (5 Posts)
  37. sayanb (3 Posts)
  38. graveyardfashions (2 Posts)
  39. mwh154 (1 Post)
  40. calavera (2 Posts)
  41. JasonOng (1 Post)
  42. httpdotcom (5 Posts)
  43. kimosabi (2 Posts)
  44. uygarpe (1 Post)
  45. csextjs (2 Posts)
  46. Richie1985 (7 Posts)
  47. eliezerreis (5 Posts)
  48. dado.cubo (1 Post)
  49. Rafael (16 Posts)
  50. chrissturm (2 Posts)
  51. thomasf (1 Post)
  52. Rainher (1 Post)
  53. timotti (2 Posts)
  54. hongfu (1 Post)
  55. rnfbr1 (2 Posts)
  56. issameddine (2 Posts)
  57. rums (4 Posts)
  58. nuser (6 Posts)
  59. mntek (2 Posts)
  60. MichaelOstrovsky (1 Post)
  61. anghuda (1 Post)
  62. longfeisoft (2 Posts)
  63. nameroc (1 Post)
  64. georgeblackjr (1 Post)
  65. vinnybozz (2 Posts)
  66. mcouillard (2 Posts)
  67. wwwtd (5 Posts)
  68. s4brown (2 Posts)
  69. Shmitt (12 Posts)
  70. CEBEP (1 Post)
  71. charleshimmer (7 Posts)
  72. ondra.cz (1 Post)
  73. Eisstern (3 Posts)
  74. rasto1968 (2 Posts)
  75. hpandey (1 Post)
  76. xpete (1 Post)
  77. pratapbm (1 Post)
  78. leonardb (2 Posts)
  79. Trinad (2 Posts)
  80. larkworm (1 Post)
  81. bobjbain (1 Post)
  82. NetFantom (1 Post)
  83. amini (2 Posts)
  84. quen567 (2 Posts)
  85. pieter333 (1 Post)
  86. creepi (1 Post)
  87. ekhanh101 (4 Posts)
  88. alexbanda1982 (1 Post)
  89. damon1977 (1 Post)
  90. pablosn (2 Posts)
  91. cnesbit (1 Post)
  92. uniring (2 Posts)
  93. Jim.Barrows (1 Post)
  94. y_joren3 (2 Posts)
  95. ranadheersingh (2 Posts)
  96. quicksilver_in (2 Posts)
  97. Bleak (1 Post)
  98. janasri (1 Post)
  99. agfk (4 Posts)
  100. mcaudle28 (3 Posts)
  101. msinn (2 Posts)
  102. madirishman (2 Posts)
  103. blackghost (6 Posts)
  104. zvds (1 Post)
  105. sonixbp (5 Posts)
  106. tripEXITo (1 Post)
  107. erikenge (1 Post)
  108. sideview1 (1 Post)
  109. kuthz (1 Post)
  110. AfzalA (1 Post)
  111. pomuchi (1 Post)
  112. DerSalz (2 Posts)
  113. brycekmartin (2 Posts)
  114. malkandari (1 Post)
  115. eurobax (3 Posts)
  116. Fallen Zen (6 Posts)
  117. mayurid (1 Post)
  118. rOCTb (1 Post)
  119. t2nguyen (1 Post)
  120. Manivel (10 Posts)
  121. wigwam_salesman (13 Posts)
  122. ExTriqui (4 Posts)
  123. Tod (2 Posts)
  124. PavelG (1 Post)
  125. joelchu (1 Post)
  126. optiplex (1 Post)
  127. grace.lawrence (1 Post)
  128. bhuskey (2 Posts)
  129. jimprotos (1 Post)
  130. anuruddha84 (1 Post)
  131. Mcaveti (1 Post)
  132. arunmatics (1 Post)

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar