03.04.2009, 08:05 | #1 |
Участник
|
Solutions Monkey: Always keep the Filter section expanded in AxGridView
Источник: http://blogs.msdn.com/solutions/arch...xgridview.aspx
============== During AxUG Webinar, I got a question around how to keep the filter section always expanded in a gridview in Microsoft Dynamics AX 2009 EP. Unfortunately we don't have a simple property to do that in the AxGridView control. Since it's all ASP.NET and javascript, I mentioned that there should be an easy workaround available. If you add the below javascript code to your user control at the bottom of the markup file ( .ascx file) then the filter section will always be in expanded mode both during initial load as well as during subsequent postbacks. Since the below code uses lot's of internals such as ids and stylesheet names, it is not guaranteed to work in subsequent releases of EP. But if you need this capability in Ax 2009 and specific pages, this may be useful. function ExpandFilter(sender, args) { var elem = document.getElementById('div_'); var parentDiv = elem.parentNode; var filterArea = DynamicsFilter.GetFilterArea(elem); if (DynamicsCommon.IsNull(filterArea)) return; elem.style.display = ''; var applylink = DynamicsCommon.FindInstance(parentDiv, "applyfilter"); var resetlink = DynamicsCommon.FindInstance(parentDiv, "resetfilter"); var editfilterlink = DynamicsCommon.FindInstance(parentDiv, "editfilter"); if (!DynamicsCommon.IsNull(applylink) && !DynamicsCommon.IsNull(resetlink) && !DynamicsCommon.IsNull(editfilterlink)) { editfilterlink.style.display = 'none'; applylink.style.display = ''; resetlink.style.display = ''; } } Sys.WebForms.PageRequestManager.getInstance().add_endRequest(ExpandFilter); ExpandFilter(); ============== Источник: http://blogs.msdn.com/solutions/arch...xgridview.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|