AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX: Программирование
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 22.11.2018, 21:31   #7  
wojzeh is offline
wojzeh
Участник
Аватар для wojzeh
Соотечественники
 
674 / 512 (19) +++++++
Регистрация: 27.04.2006
Адрес: Montreal
перебирай все колонки и ищи с нужным именем. примерно вот так:

X++:
// returns the batch caption form control if any in the dialog
private FormStringControl getBatchCaptionControl(DialogRunbase _dialog)
{
    FormStringControl                  batchCaptionControl;

    // recursive routine to look for the right form control of BatchCaption EDT
    Object findBatchCaptionControl(Object _parentObject)
    {
        int         i;
        Object      childControl;
        Object      foundControl;


        for (i = 1; i <= _parentObject.controlCount(); i++)
        {
            childControl = _parentObject.controlNum( i );

            // this is our boy
            if( childControl is FormStringControl && childControl.extendedDataType() ==  extendedTypeNum(BatchCaption))
            {
                // time to get up
                return childControl;
            }
            else
            {
                if (childControl is FormGroupControl)
                {
                    foundControl = findBatchCaptionControl(childControl);
                    if (foundControl)
                    {
                        return foundControl;
                    }
                }
            }
        }
        // just step back to check others
        return null;
    }
/////// main routine  /////////////////////////////////////////////////////////////
    if( _dialog && _dialog.batchDialogTabPage())
    {
        batchCaptionControl = findBatchCaptionControl(_dialog.batchDialogTabPage().control());
    }

    return batchCaptionControl;
}
__________________
Felix nihil admirari
За это сообщение автора поблагодарили: yuriy_64 (1).
Теги
grid, колонки, переименовать

 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
d365technext: Card Pattern in Grid D365FO & AX 7 Blog bot DAX Blogs 0 02.08.2018 11:11
atinkerersnotebook: Self Service Reporting For Users – Part 2: Use Edit in Grid as your Reporting Worksheet Blog bot DAX Blogs 0 06.10.2015 15:11
tlefor: Dynamics AX 2012: How Wide is my Grid Column? Blog bot DAX Blogs 0 28.10.2013 10:11
axaptapedia: Filter-by-Grid Blog bot DAX Blogs 2 30.05.2012 13:39
Dynamics AX: DAX 4.0 Filter by Grid [Update] Blog bot DAX Blogs 0 27.04.2007 17:10

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 01:52.