AXForum  
Zurück   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Kennwort vergessen?
Registrieren Forum Rules Hilfe Benutzerliste Heutige Beiträge Suchen

 
 
Themen-Optionen Thema durchsuchen Ansicht
Alt 16.07.2019, 01:15   #1  
Blog bot ist offline
Blog bot
Участник
 
25.644 / 848 (80) +++++++
Registriert seit: 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, напишите личное сообщение администратору.
 

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
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

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Gehe zu

Рейтинг@Mail.ru
Alle Zeitangaben in WEZ +3. Es ist jetzt 18:53 Uhr.
Powered by vBulletin® Version 3.8.5 (Deutsch)
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.