Hello,
I have 2 data sources, let's say HeaderDS and LineDS. I have a grid that shows HeaderDS with LineDS (with outer join) fields. I have a field F1 from LineDS and F1Color control that should have different background colors depending on the F1 value.
I was trying 2 possible solutions but both of them do not work.
Variant 1:
I have just added a method in displayOption for LineDS.
public void displayOption(Common _record, FormRowDisplayOption _options)
{
LineDS table;
table = _record;
_options.affectedElementsByControl(control_F1Color.id());
if(table.F1 > 100)
{
_options.backColor(WinAPI::RGB2int(#PastelGreen));
}
else
{
_options.backColor(WinAPI::RGB2int(#PastelRed));
}
super(_record, _options);
}
But the problem is that it is not invoked when showing the grid.
Variant 2:
To add displayOption for HeaderDS but then I need to find all LineDS records and for each of the display the color field separately.
So, maybe you know how to proceed with that?