建议在后台代码的页面加载事件中输出客户端脚本脚本内为DataGrid在客户端的html标记(有Table的,可以查看输出网页的源代码)增加客户端事件

解决方案 »

  1.   

    http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/dhtml_reference_entry.asp用js,参考一下上面的dhtml吧。
      

  2.   

    呵呵建议到微创crm软件去看一下别人怎么做的,网址:http://210.22.110.194/crm/login.aspx?ReturnUrl=%2fcrm%2fdefault.aspx
    账号:adas  密码:aaa111
    里面就有控制datagrid列的方法。
      

  3.   

    再推,
    楼上的东东很好,可惜没有找到控制Datagrid列的方法:(
      

  4.   

    datagrid在客户端就是table,试试下面的代码
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>table</title>
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    var startx=0;
    var mousePress=false;
    var destElm;
    var oldWidth=40;
    function down()
    {
    startx = event.x;
    mousePress=true;
    with (event.srcElement)
    destElm = parentNode.cells[cellIndex-1]
    oldWidth = destElm.offsetWidth;
    }
    function up()
    {
    mousePress=false;
    }
    function move()
    {
    if (!mousePress) return;
    var d=event.x-startx+oldWidth;
    if (d>0) destElm.width=d;
    }
    //-->
    </SCRIPT>
    <style>
    .left {border-left:1px solid black}
    .top {border-top:1px solid black}
    .left-top {border-top:1px solid black;border-left:1px solid black}
    TABLE{border:1px solid black}
    </style>
    </head>
    <body onmouseup=up() onmousemove=move()>
    <table>
    <tr>
    <td>IPC</td><td onmousedown=down() style="CURSOR: e-resize"></td>
    <td class=left>IPC</td><td onmousedown=down() style="CURSOR: e-resize"></td>
    <td class=left>IPC</td><td onmousedown=down() style="CURSOR: e-resize"></td>
    <td class=left>IPC</td><td onmousedown=down() style="CURSOR: e-resize"></td>
    </tr>
    <tr>
    <td  class=top>fgqa</td><td onmousedown=down() style="CURSOR: e-resize"></td>
    <td  class=left-top>fgqa</td><td onmousedown=down() style="CURSOR: e-resize"></td>
    <td  class=left-top>fgqa</td><td onmousedown=down() style="CURSOR: e-resize"></td>
    <td  class=left-top>fgqa</td><td onmousedown=down() style="CURSOR: e-resize"></td>
    </tr>
    <tr>
    <td  class=top>fgqa</td><td onmousedown=down() style="CURSOR: e-resize"></td>
    <td  class=left-top>fgqa</td><td onmousedown=down() style="CURSOR: e-resize"></td>
    <td  class=left-top>fgqa</td><td onmousedown=down() style="CURSOR: e-resize"></td>
    <td class=left-top>fgqa</td><td onmousedown=down() style="CURSOR: e-resize" 
     ></td>
    </tr>
    </table><INPUT style="CURSOR: e-resize" onmousedown=down() id=button1 type=button value=Button name=button1></body>
    </html>
      

  5.   

    to:mynewpc(水中日月)是上好东东
    收藏!