dongluan5740 2013-06-09 14:31
浏览 74
已采纳

仅使用一个表冻结表列和行

I have a dynamic table which is filled from an Application. My problem is that I need some way to freeze the first row and the first four columns BUT using only one table, obviously because I will be posting the table back again to the application.

My Current Table Code :

....
<form name="myform" method="post" action="test123.php" onsubmit="set_value();">
//this form is used to post back the data after user updates it.
<br /> 
<table align="center" id="dataTable">
<thead>
<tr class="header">
...
$arratt49 = (explode(',',$response49,-1)); //sending an array from application
$dayscounter = sizeof($arratt49);
$sizemon = strlen($month1);
if($sizemon > 0)
{
    echo "<th class='text ce6'>No.</th>";
    echo "<th class='text ce6'>Emp code</th>";
    echo "<th class='text ce6'>Name</th>";
    echo "<th class='text ce6'>Department </th>";
for($kkk=0;$kkk<$dayscounter;$kkk++)
    {
    echo "<th class='text ce7'>";
    echo $arratt49[$kkk];
    echo "</br>";
    echo $arratt49[$kkk+1];
    echo "</th>";
    $kkk = $kkk +1;
    }
}
</tr>
</thead>
<tbody>
<tr>
....//Here goes the Body
for($k=0;$k<=$arrcnt;$k++)
    {   
                echo "<td class='text ce2'>";
                echo $counter;
                echo "</td>";                   
                echo "<td class='text ce2'><INPUT type='text' name='code[]' size = '8' readonly='true 'value='";
                echo $arratt[$k];
                echo "'";
                echo "</td>";
                echo "<td class='text ce2'><INPUT type='text' name='name[]' size = '40' readonly='true' value='";
                echo $arratt[$k+1];
                echo "'";
                echo "</td>";
                echo "<td class='text ce2'><INPUT type='text' name='dept[]' size = '12' readonly='true 'value='";
                echo $arratt[$k+2];
                echo "'>";
                echo "</td>";

Already tried :
Big Four method
and also This

Any Good Ideas? Again I CANNOT use more than one table method.

enter image description here

  • 写回答

1条回答 默认 最新

  • dtn36013 2013-06-09 17:14
    关注

    You can use datatables plugin FixedColumns, just set parameter "iLeftColumns" to the number of columns needed to be fixed from the left side of table. Header already fixed by default.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)
  • ¥15 AIC3204的示例代码有吗,想用AIC3204测量血氧,找不到相关的代码。