atlas一个bug,gridview在地衣次添加数据时不能选择,期待大虾出手!!!
当数据库表中没有数据时,运行后,在页面中输入数据并保存,此时单击gridview中的选择按钮,就报错__doPostBack('GridView1','Select$0'),在这个脚本代码处中断。
如果数据库中有数据则不存在这个问题。
不用atlas实现无刷新,无论数据库中开始是否有数据gridview地选择按钮都可以选择,用atlas就不可以.

解决方案 »

  1.   

    请问各位如何解决上述问题,或者如何在数据库中无数据时将atlas地无刷新功能关闭,当添加 一条记录后再打开无刷新功能。
      

  2.   

    在你的页面加上
    <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>