如何使用Acumatica以编程方式更改当前选项卡? [英] How can you change current tab programmatically with Acumatica?

查看:25
本文介绍了如何使用Acumatica以编程方式更改当前选项卡?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我启动自定义Framework页面时,我将能够根据特定条件以编程方式激活选项卡之一。我是否仍在使用javaScript停留还是有其他方法?

When I launch a custom Framework page, i would to be able to activate one of the tabs programmatically depending on certain conditions. Am i stuck using javaScript or is there another way?

推荐答案

您可以使用Javascript函数并将其附加到相应的函数中Acumatica表单上的客户事件。

You can do this using a Javascript function and attaching it to the corresponding client event on your Acumatica form.

在这里,我希望选项卡根据网格中活动单元格的索引进行更改。因此,我将 aftercellchange cellclick 网格事件(客户端事件)设置为我的 gridclick Javascript函数。最后,将此脚本添加到我的aspx页面:

Here, I wanted the tab to change based on the index of the active cell in a grid. So I set the aftercellchange and cellclick grid-events(client events) to my gridclick Javascript function. Finally, added this script to my aspx page:

    <script type="text/javascript">
    function gridClick()
    {
            var index = px_alls["grid"].activeCell.getIndex();
            if(index<=2) px_alls["tab"].items[0].select();
            if(index>=3 && index<=5) px_alls["tab"].items[1].select();
            if(index>=6) px_alls["tab"].items[2].select();
    }
</script>

这篇关于如何使用Acumatica以编程方式更改当前选项卡?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆