combinación de herramientas ColsVisibility & Operaciones

combinación de herramientas ColsVisibility & Operaciones

zashjzashj Posts: 1Questions: 1Answers: 0
edited August 2019 in Free community support

hola estoy haciendo una tabla donde coloco la extensión ColsVisibility y en dos de las columnas tengo que hacer una sumatoria de las filas filtradas ...cuando agrego la instrucción de la suma (sum) desaparece ColsVisibility esta es la instrucción que uso para las sumatorias..

 var tfConfig = {
             base_path: 'table/dist/tablefilter/',
             auto_filter: {
             delay: 1100 //milliseconds
             },
             operación_col: {  
             id: [ "tot" , "tot1" , 'tot2' , 'tot3' ],    
             col: [3,4,3,4],    
             operación: [ "sum" , "sum" , "sum" , 'mean' ],    
             método_escritura: [ "innerhtml" , 'innerhtml' , "innerhtml" , 'innerhtml' ],    
             exclude_row: [totRowIndex, (totRowIndex + 1)],    
             precisión_decimal: [2,2,2,2],  
             tot_row_index: [totRowIndex]  
             },  
             on_after_operation: formatTotals,  
             /* columns visibility and sort extension */
             extensions: [{
                   name: 'colsVisibility',
                   text: 'Columns: ',
                   enable_tick_all: true,
                   }, {
                   name: 'sort'
             }],
                        
             status_bar: true,
             col_3: 'select',
             col_types: [
                 'number', 'string', 'string',
                 'formatted-number', 'formatted-number', 'string'
             ],
                       
             };
                var tf = new TableFilter('stones', tfConfig);
                tf.init();
                        

Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Hi @zashj ,

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

This discussion has been closed.