crm 2011使用javascript在仪表板上隐藏和显示子网格 [英] crm 2011 hide and show subgrids on dashboard with javascript

查看:110
本文介绍了crm 2011使用javascript在仪表板上隐藏和显示子网格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的仪表板上有两个垂直对齐的子网格。我可以隐藏或显示任何一个子网格,但是当我隐藏顶部的子网格时,底部的网格不会移到顶部,这是网格所在的空白区域。
我希望两个网格在显示或隐藏时都出现在页面上的相同位置。

I have two subgrids on my dashboard which are vertically aligned. I am able to hide or show either subgrid, however when I hide the top subgrid, the bottom grid does not move to the top, there is an empty space where the grid use to be. I would like to both grids appear in the same location on the page as they are shown or hidden.

我有以下代码可以隐藏/显示:

I have the code below to hide/show:

setVisible('subgrid1_d', false);
setVisible('subgrid2_d', true);

function setVisible(id, show){

   if (show == true)
        $('#' + id).show();
  else
        $('#' + id).hide();
}

我们将尽力帮助您。

推荐答案

您应该将子网格放在不同的区域中,并显示和隐藏子网格所在的区域。

You should put your subgrids in different sections and show and hide the section where the subgrid is.

请记住,使用jquery访问不支持的表单元素,应该始终使用Xrm.Page。

Remember that using jquery to access the form elements it is not supported, you should always use the Xrm.Page.

这篇关于crm 2011使用javascript在仪表板上隐藏和显示子网格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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