发现atlas一个bug ,gridview控件选择按钮,在第一次添加数据时,不能选择。

当数据库表中没有数据时,运行后,在页面中输入数据并保存,此时单击gridview中的选择按钮,就报错__doPostBack('GridView1','Select$0'),在这个脚本代码处中断。
如果数据库中有数据则不存在这个问题。
不用atlas实现无刷新,可以选择,用atlas就不可以.


找到解决办法拉:
在前台脚本中增加下面的脚本即可.
 <script type="text/javascript">
    <!--
    var theForm = document.forms['form1'];
    if (!theForm) {
    theForm = document.form1;
    }
    function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
    theForm.__EVENTTARGET.value = eventTarget;
    theForm.__EVENTARGUMENT.value = eventArgument;
    theForm.submit();
    }
    }
    // -->
   </script>

posted on 2006-09-28 21:34  sk  阅读(556)  评论(1)    收藏  举报

导航