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. #41
    Sencha User
    Join Date
    Feb 2008
    Posts
    6
    Vote Rating
    0
    Rainher is on a distinguished road

      0  

    Default


    Hi all,
    first of all, congratulations on this wonderful plug-in.
    My only problem is that, on initial load of the data, the total isn't refreshed and stays at 0.
    Furthermore, when editing an already populated grid (ie. starting values not at 0), the total starts counting from the new value.
    What am I missing?
    Many thanks in advance!

    Code:
    <?php
    $this->load->helper('form');
    ?>
    <div id="subtitle">
    <h2>Area impresa - Modulo 1</h2>
    <h3>B. Pesatura FCA</h3>
    	<div id="infoint">
    		Intervista: <?= $id; ?><br>
        	Azienda: <?= $DENOMINAZIONE_AZ; ?><br>
    		Tutor: <?= $tutor; ?>
    	</div>
    </div>
    <div>
    	<?=form_open('hitex/unofca/'.$id); ?>
    	<div class="destra"><input type="image" src="<?= base_url(); ?>img/avanti.gif" alt="Prosegui" onclick="return checkAndSend();"></div>
    	<input type="hidden" name="serval" id="serval" value="">
    	<?=form_close(); ?>
    </div>
    <div style="text-align: left;">
    	<div id="grid"></div>
    </div>
    <script>
    <!--
    	var grid;
    	var summary;
    	Ext.BLANK_IMAGE_URL = '<?= base_url() ?>ext/resources/images/default/s.gif';
    	Ext.onReady(function(){
    
    function totPesi(v, params, data)
    {
    	return 'Totale: '+ v;
    }
    
    var ds = new Ext.data.Store({
        proxy: new Ext.data.HttpProxy({
            url: '<?= base_url() ?>index.php/ajax/unofca/<?= $id; ?>',
    		method: 'post'
        }),
        reader: new Ext.data.JsonReader({
            root: 'dati',
    		totalProperty: 'totale',
            id: 'id'
        }, [
            {name: 'nome', mapping: 'nome'},
            {name: 'categoria', mapping: 'categoria'},
    		{name: 'peso', mapping: 'peso'}
        ])
    });
    var cm = new Ext.grid.ColumnModel([
    		{
               header: "Nome",
               dataIndex: 'nome',
               width: 220
            },
    		{
               header: "Categoria",
               dataIndex: 'categoria',
               width: 220
            },
    		{
               header: "Peso",
               dataIndex: 'peso',
               width: 70,
               align: 'center',
    		   summaryType: 'sum',
    		   summaryRenderer: totPesi,
               editor: new Ext.form.NumberField({
                   allowBlank: false,
                   allowNegative: false,
    			   allowDecimals: false,
                   maxValue: 100
               })
            }
    	]);
    
    summary = new Ext.ux.grid.GridSummary();
    
    grid = new Ext.grid.EditorGridPanel({
            store: ds,
            cm: cm,
            renderTo: 'grid',
            width:600,
            height:320,
            title:'Pesi degli FCA',
            frame:false,
            clicksToEdit:1,
    		stripeRows: true,
    		plugins: [summary]
        });
      
    ds.load();
    });
    
    function checkAndSend()
    {
    	var serie = "";
    	var pesotot = 0;
    	righe = grid.store.getRange();
    	
    	for (i = 0; i < righe.length; i++) {
    		riga = righe[i];
    		
    		if (riga.data.peso < 1) {
    			Ext.Msg.alert('Errore', 'Ciascun FCA deve avere un peso maggiore di 0');
    			return false;
    		}
    
    		serie += riga.id + '|' + riga.data.peso + '#';
    		pesotot += riga.data.peso;
    	}
    
    	if (pesotot == 100) {
    		hid = document.getElementById('serval');
    		hid.value = serie;
    		//return true;
    	} else {
    		Ext.Msg.alert('Errore', 'La somma dei pesi deve essere pari a 100');
    		return false;
    	}
    }
    //-->
    </script>

  2. #42
    Ext User americos's Avatar
    Join Date
    Aug 2007
    Posts
    21
    Vote Rating
    0
    americos is on a distinguished road

      0  

    Default What about when you reconfigure DS?

    What about when you reconfigure DS?


    Hi All,

    The code works pretty nice, I have a question though... When you reconfigure the grid DS and columnModel with:
    grid.reconfigure(dataStore, columnModel)
    the summary does not update. Any clues how to accomplish this?

  3. #43
    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 americos View Post
    Hi All,

    The code works pretty nice, I have a question though... When you reconfigure the grid DS and columnModel with:

    the summary does not update. Any clues how to accomplish this?
    comment out this line
    Code:
    this.cm = grid.getColumnModel();
    and change all instances of this.cm.config to
    Code:
    this.grid.getColumnModel().config
    and let me know how that works out for you.

  4. #44
    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


    @rainher, try the latest update and let me know how that works out for you.

    (note: i only added listeners on the Store's add, remove and clear events 'cos i think those are uncaught by the GridView, but i could be wrong).

  5. #45
    Ext JS Premium Member thomasf's Avatar
    Join Date
    Feb 2008
    Location
    Vienna
    Posts
    63
    Vote Rating
    0
    thomasf is on a distinguished road

      0  

    Default Runtime Error on Line 2746 - IE7

    Runtime Error on Line 2746 - IE7


    First. Congratulations on this Extension. It is exactly what i needed! But I was wondering why this feature is not a core feature of the powerful Ext grid?


    I had a problem in IE7 when i set the grid to height: 'auto' in the config. I got a Runtime Error on line 2746 (debug version of Ext).

    My grid:
    Code:
                var summary = new Ext.ux.grid.GridSummary();
                // create the grid
                var grid = new Ext.grid.GridPanel({
                    store : store,
                    cm : new Ext.grid.ColumnModel([
                    new Ext.grid.RowNumberer(), {
                        header : this.hdrActivity,
                        width : 130,
                        dataIndex : 'activity',
                        sortable : true,
                        summaryType : 'count',
                        summaryRenderer : totalActivities
                    }, {
                        header : this.hdrHours,
                        width : 80,
                        dataIndex : 'hours',
                        sortable : true,
                        summaryType : 'sum',
                        align:'right'
                    }, {
                        header : this.hdrSum,
                        width : 80,
                        dataIndex : 'amount',
                        sortable : true,
                        renderer: moneyFormat,
                        align:'right',
                        summaryType : 'sum'
                    }]),
                    viewConfig : {
                        forceFit : true
                    },
                    renderTo : 'time-grid-activity',
                    iconCls : 'icon-grid',
                    plugins : summary,
                    stripeRows : true,
                    width : 350,
                    height : 'auto',
                    maxHeight : 500,
                    autoHeight : true,
                    collapsible : true,
                    animCollapse : false,
                    loadMask : true,
                    footer : true,
                    title : this.gridTitleActivity
                });
    To get this working (Quick&Dirty ) i changed the onLayout Function in the Ext.ux.grid.GridSummary:
    Code:
      onLayout : function(vw, vh) {
        if ('number' !== Ext.type(vh)) {
            return;
        }
        // note: this method is scoped to the GridView
        if (!this.grid.getGridEl().hasClass('x-grid-hide-gridsummary')) {
          // readjust gridview's height only if grid summary row is visible
          this.scroller.setHeight(vh - this.summary.getHeight());
        }
      },
    Hope this helps.

  6. #46
    Ext User
    Join Date
    Feb 2008
    Posts
    1
    Vote Rating
    0
    hongfu is on a distinguished road

      0  

    Default Thanks a lot .

    Thanks a lot .


    it really helps.
    thanks.

  7. #47
    Ext JS Premium Member
    Join Date
    Dec 2007
    Posts
    68
    Vote Rating
    0
    sayanb is on a distinguished road

      0  

    Question Any examaples on this ??

    Any examaples on this ??


    Hi All,

    Are there any examples of the grid summary? Screenshots would be nice too.

    Also my organisation just got a team license with Gold support, and we are basing an entire slew of applications on Ext.

    What are the additional resource that we could get our hands on?

    Thanks
    sayanb

  8. #48
    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 sayanb View Post
    Hi All,

    Are there any examples of the grid summary? Screenshots would be nice too.
    they're all on the previous page - screenshots, and a zip containing the plugin code and a full drop-in example.

  9. #49
    Ext JS Premium Member
    Join Date
    Dec 2007
    Posts
    68
    Vote Rating
    0
    sayanb is on a distinguished road

      0  

    Default Horizontal Scrolling on GridSummary

    Horizontal Scrolling on GridSummary


    My grid has a too many columns . The summary plugin is of no use if I can not horizontally scroll on the summary. Is there a work around ?

    Any response would be appreciated.

  10. #50
    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 sayanb View Post
    My grid has a too many columns . The summary plugin is of no use if I can not horizontally scroll on the summary. Is there a work around ?

    Any response would be appreciated.
    i don't know which plugin u're using, but the one i posted scrolls horizontally (as shown in the screenshot).

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