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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 01.08.2018, 19:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
d365technext: Grid/List row color change using method override D365
Источник: http://d365technext.blogspot.com/201...ng-method.html
==============



Grid/List row color change using method override D365

Today, I received the requirement from my functional to change the row color Grid/List page on any specific condition...

As we all knows in custom form its really easy to achieve but in my case I need to do this on exists form using method override/Event handler of Data source..

So I start searching over internet and community and found that lots of people were facing the same issue because this feature is not available in extension...

After the resolution of this task i decide to share with everyone..


There is an event available in data source OnDisplayOptionInitilized. I copied the event handler and paste on my class.



Following are the code


[FormDataSourceEventHandler(formDataSourceStr(JmgRegistrationTouchAssignedJobs, JmgJobTable), FormDataSourceEventType::DisplayOptionInitialize)]
publicstaticvoid JmgJobTable_OnDisplayOptionInitialize(FormDataSource sender, FormDataSourceEventArgs e)
{


}


Now another challenge is ready for me to find the display Option and set the back-ground color..
After one hour of efforts found a class FormDataSourceDisplayOptionInitializeEventArgs which we can use to set the color








Following is the complete code
///
///
///
///
///
[FormDataSourceEventHandler(formDataSourceStr(JmgRegistrationTouchAssignedJobs, JmgJobTable), FormDataSourceEventType::DisplayOptionInitialize)]
publicstaticvoid JmgJobTable_OnDisplayOptionInitialize(FormDataSource sender, FormDataSourceEventArgs e)
{
FormDataSourceDisplayOptionInitializeEventArgs fdsoption;
fdsoption= e asFormDataSourceDisplayOptionInitializeEventArgs;
fdsoption.displayOption().backColor(WinAPI::RGB2int(161,161,255));
}




Here is the result of my all efforts.









Источник: http://d365technext.blogspot.com/201...ng-method.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
mscrmblog: Filtering a Grid in a CRM 2013 Dashboard based off another Grid’s selected row Blog bot Dynamics CRM: Blogs 0 08.01.2015 09:14
Navigate Into Success: Try..Catch for .NET Interoperability Blog bot Dynamics CRM: Blogs 0 29.10.2014 09:00
dynamics-coe: Show Members Sub Grid on Marketing List Form in Dynamics CRM 2011 Blog bot Dynamics CRM: Blogs 0 20.05.2013 18:11
Microsoft Dynamics CRM Team Blog: Marketing with Dynamic List Blog bot Dynamics CRM: Blogs 0 09.11.2010 19:05
Kashperuk Ivan: List panels in Dynaics AX - a short description of SysListPanel class Blog bot DAX Blogs 1 21.10.2007 22:51
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

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

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

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