AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 03.04.2009, 08:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
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, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Solutions Monkey: EP Page Life Cycle Blog bot DAX Blogs 0 18.02.2009 08:05
Solutions Monkey: Microsoft Dynamics AX 2009 Enterprise Portal / Role Centers - Deployment Tips-n-Tricks – 3 Blog bot DAX Blogs 0 27.10.2008 08:05
Solutions Monkey: Role Center Security Blog bot DAX Blogs 0 28.05.2008 16:05
Solutions Monkey: EP 4.0 Questions Blog bot DAX Blogs 0 28.10.2006 16:40
Solutions Monkey: Microsoft Business Solutions Hits First Full Profitable Year Blog bot DAX Blogs 0 28.10.2006 16:40

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 20:55.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.