Показать сообщение отдельно
Старый 06.12.2018, 18:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
sashanazarov: Controlling grid line colors
Источник: http://sashanazarov.blogspot.com/201...ne-colors.html
==============

Can see some folks have found the DisplayOptionInitialize event, still they are in doubt on how to control the displayOption settings based on the selected line.


Here is the solution:


X++:
[FormDataSourceEventHandler(formDataSourceStr(Form1, SalesTable), FormDataSourceEventType::DisplayOptionInitialize)]
public static void SalesTable_OnDisplayOptionInitialize(FormDataSource sender, FormDataSourceEventArgs e)
{
FormDataSourceDisplayOptionInitializeEventArgs args = e as FormDataSourceDisplayOptionInitializeEventArgs;
RecId currentRecId = args.record().RecId;
int rgbValue = 255 - (20 * (currentRecId mod 2));
args.displayOption().backColor(WinAPI::RGB2int(rgbValue, rgbValue, rgbValue));
}





Источник: http://sashanazarov.blogspot.com/201...ne-colors.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.