Form Grid Cell color display problem in AX 2009

In my requirement,.there should be an alert(red color any thing ) on the form as soon as "ID"( field) value cross the Dimension type. How to do ..is there any thing is in existing system.

Handled as belows:

override the displayOption method of the data source and specify the color criteria. A sample code is below. (Written on CustTable data source of the custTable
form).

代码
/***
In my requirement,.there should be an alert(red color any thing ) on the form as soon as "ID"( field) value cross the Dimension type. How to do ..is there any thing is in existing system.

Handled as belows:

override the displayOption method of the data source and specify the
color criteria.
A sample code is below. (Written on CustTable data source of the custTable
form).
*/
public void displayOption(Common _record, FormRowDisplayOption _options)

{

QVS_NewDimensions NewDimensions;

;

NewDimensions
= _record;

switch(NewDimensions.NewDim)

{

Case QVS_NewDim::Brand :


_options.textColor(winapi::rgb2int(
255,10,52));

_options.backColor(winapi::rgb2int(
122,100,100));

_options.affectedElementsByControl(Grid_Num.id(),Grid_Description.id());

break;

Case QVS_NewDim::Category:


_options.backColor(winapi::rgb2int(
10,211,52));

_options.textColor(
12582912);

break;

default :

_options.backColor(winapi::rgb2int(
10,0,52));

_options.textColor(
255);

break;

}

super(_record, _options);

}



 

posted @ 2010-05-28 09:32  Fandy Xie  Views(431)  Comments(0Edit  收藏  举报