crm 2011 hide and show subgrids on dashboard with javascript

♀尐吖头ヾ 提交于 2019-12-13 06:59:59

问题


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();
}

Any help is appreciated.


回答1:


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

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



来源:https://stackoverflow.com/questions/29202722/crm-2011-hide-and-show-subgrids-on-dashboard-with-javascript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!