可以实现,使用jquery遍历表格表头,取得列名,组成json传过去。。

解决方案 »

  1.   

      //获得表头名称
      function CheckTotal(textBoxObj)  {  
        var trNode = textBoxObj.parent().parent();             
        var tabList=new Array();
        $("#grid").find('th').each(function (thindex, thitem) { //遍历Table grid的th  
            var headCaption = $(thitem).text();  
            if (headCaption != "") {  
            
            tabList.push(headCaption);
            }                         
        });  
       // console.log('数组:',tabList);
       return tabList;
    }  可以参考这个