2012-07-17 32 views
0

我使用this美妙的腳本使我的表格可以排序,併爲其添加一些過濾器。我的問題是,我需要總是看到thead中的第二行(用複選框)。點擊時我避免了對行進行排序(通過將td替換爲th,儘管它位於thead中)。 所以主要的問題是,我需要看到複選框(thead/td,它不應該是活動的(當點擊按照上面的行對錶格進行排序時)),也總是看到tfoot - 當添加時也是隱藏的過濾器... 這裏是我的設置HTML表格過濾器腳本+可排序表格:始終顯示tfoot和thead

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

回答

0

我發現我需要什麼 首先我們需要做的是讓頁腳的行號: var totRowIndex = tf_Tag(tf_Id('advancedtable1'),"tr").length; //advancedtable1 is the table id 然後我a將此 rows_always_visible:[2,totRowIndex]添加到表格道具中,其中2是我希望總能看到的第t行,totRowIndex是頁腳行。