HTML表格过滤器脚本+可排序表格:始终显示tfoot和thead

时间:2012-07-17 07:09:02

标签: html html-table sortable-tables

我使用this精彩脚本使我的表可排序并为其添加一些过滤器。我的问题是,我需要总是看到thead中的第二行(带有复选框)。我在单击时避免对行进行排序(通过将其改为td而不是它在thead中)。 所以主要的问题是我需要看到复选框(thead / td并且它不应该是活动的(当点击以将表排序为上面的行时))并且还总是看到tfoot - 当添加过滤器时它也被隐藏... 这是我的设置

var Props =  {
          popup_filters: true,
          mark_active_columns: true,
          sort: true,
          sort_config: {  
            sort_types:['EU','EU','EU','EU','EU','EU','EU','EU','EU','EU','EU','EU','EU','EU']  
          },  
          loader: true,  
          loader_html: '<img src="/images/load.gif" style="vertical-align:middle; margin:0 5px 0 5px"><span>Зареждане...</span>',
          mark_active_columns: true,
          col_0: "select",  
            col_1: "multiple",  
            col_2: "select",  
            col_3: "select",
            cEUtom_slc_options: {  
        cols:[1],  
        texts: [['0- 50','60 - 80','80 - 100']],  
        values: [  
                    ['<=50','>60 && <=80','>80 && <=100']  
                ],  
        sorts: [false],
        sort_config: {  
            sort_types:['EU','EU','EU','EU','EU','EU','EU','EU','EU','EU','EU','EU','EU','EU']  
        }, 
    },   
    themes: {   
    name:['MyTheme'],   
    src:['TableFilter/TF_Themes/MyTheme/MyTheme.css'],   
    description:['My stylesheet'],   
    initialize:[null]  
} 
        };
          setFilterGrid("advancedtable1",Props );

enter image description here

1 个答案:

答案 0 :(得分:0)

我找到了我需要的东西 首先我们需要做的是获取页脚的行号: var totRowIndex = tf_Tag(tf_Id('advancedtable1'),"tr").length; //advancedtable1 is the table id 然后我加了这个 rows_always_visible:[2,totRowIndex]到表道具,其中2是我想要总是看到的行,而totRowIndex是页脚行。