最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

在Grid Dynamics 365中为财务和运营更改基于单元格值的文本/背景颜色 / Change Text/BackGround Color Based Off Cell Value in Grid Dynamics 365 for finance and operations

网络文摘 alirazazaidi 1315浏览 0评论
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
发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址