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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 16.07.2019, 01:15   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
alirazazaidi: Change Text/BackGround Color Based Off Cell Value in Grid Dynamics 365 for finance and operations
Источник: https://www.tech.alirazazaidi.com/ch...nd-operations/
==============

Hi all, today I got opportunity to change color of Grid Cell based on some condition.

I achieved this by following code snippet.
First all I set Auto declaration to true of  required control in grid,
Second I add overwrite displayOption of grid data source.

This code snippet is interesting. It triggers for every row on grid.
And if you see below code snippet method signature shows the Common _Record. With this common _record, we can get current row of data source. And this we can apply some condition

Suppose we what to customer Name background to red who has credit limit is less then 1000  Following works

  public void displayOption(Common _record, FormRowDisplayOption _options)
        {

            CustTable custTable = _record as CustTable;


            if ( custTable.CreditLimit  < 1000)
            {

                _options.affectedElementsByControl(CustName.id());
                _options.backColor(WinApi::RGB2int(255,0,0));
                _options.textColor(WinApi::RGB2int(255,255,255));
            }
            super(_record, _options);


        }

Happy DAXing.


No more MVP


Источник: https://www.tech.alirazazaidi.com/ch...nd-operations/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
alirazazaidi: Table method extension and grid field mapping Dynamics 365 for finance and operations Blog bot DAX Blogs 0 05.12.2018 02:27
survivingcrm: What’s An “App” in Dynamics 365 Anyway? Blog bot Dynamics CRM: Blogs 0 06.01.2018 22:14
jaestevan: Microsoft Dynamics 365 for Operations Blog bot DAX Blogs 0 02.11.2016 01:11
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 16 Blog bot Dynamics CRM: Blogs 0 23.01.2014 03:15
Platform updates overview - 3.70.B - NAV2009 R2 Blog bot Dynamics CRM: Blogs 0 07.02.2011 22:06
Опции темы Поиск в этой теме
Поиск в этой теме:

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

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

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

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