当我在嵌套子网格中单击分页时,它会自动关闭 colapse 并转到父网格,如何修复?

When I click Pagination in Nested Child Grid its automatically close the colapse and going to Parent grid, How to fix?

提问人:Micle Colinse 提问时间:10/31/2023 最后编辑:AdaMicle Colinse 更新时间:11/5/2023 访问量:6

问:

我将创建总共 3 个网格,例如父、子和嵌套子。一切正常,但我还在每个网格中链接了编辑和分页。当我单击父网格折叠它时,它起作用,当我单击子折叠时,它也起作用,但是当我单击嵌套子网格分页或编辑按钮时,它也起作用,但在单击嵌套子网格分页/编辑后,它跳转并转到父网格。

怎么修...!!

这是我的 JavaScript 函数:

<script language="javascript" type="text/javascript">
    function expandcollapse(obj,row)
    {
        var div = document.getElementById(obj);
        var img = document.getElementById('img' + obj);
        
        if (div.style.display == "none")
        {
            div.style.display = "block";
            if (row == 'alt')
            {
                img.src = "img/minus.png";
            }
            else
            {
                img.src = "img/minus.png";
            }
            img.alt = "Close to view other Customers";
        }
        else
        {
            div.style.display = "none";
            if (row == 'alt')
            {
                img.src = "img/plus.png";
            }
            else
            {
                img.src = "img/plus.png";
            }
            img.alt = "Expand to show Orders";
        }
    }
</script>
gridview 展开

评论


答: 暂无答案