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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 18.07.2011, 01:48   #1  
ideveloper is offline
ideveloper
Участник
 
34 / 11 (1) +
Регистрация: 11.05.2011
How to overwrite a display value of the edit field
Hi all.

I have the following problem:

I have 2 data tables which represent the relation between the customers and the bonus codes.

Table A
BonusCode | recId

Table B
AccountNum | ArticleNum | TableARecId (as key)

Now I am trying to create a form containing the grid with the AccountNum, ArticleNum and the BonusCode. The BonusCode field should have a lookup function to the data in the Table A. When I get the value of the BonusCode with the display method I must create my own lookup method from zero to have the possibility to choose the data.

Could I instead include the TableARecId in the grid as the edit field and overwrite the show method to show the value of the bonus code???
Старый 26.07.2011, 07:54   #2  
TasmanianDevil is offline
TasmanianDevil
Мрачный тип
Аватар для TasmanianDevil
Злыдни
 
885 / 389 (14) ++++++
Регистрация: 24.01.2005
Адрес: Томск
Цитата:
Сообщение от ideveloper Посмотреть сообщение
Could I instead include the TableARecId in the grid as the edit field and overwrite the show method to show the value of the bonus code???
For what ?
You may use edit-method on TableB datasource for displaying and editing BonusCode on the grid.
X++:
edit <BonusCodeType> BonusCodeValue(boolean set, TableB record, str Id)
{
    if(set)
        record.TableARecId = str2int64(id);

    return (select BonusCode from TableA where TableA.RecId == record.TableARecId).BonusCode;     
}
Override lookup() method on the control (usig SysTableLookup class or control method performTypeLookup() ), placed on the grid and assigned to edit method - he will be used as source of Id value in edit method. One value - one control. Something else is unnatural
__________________
Мы летаем, кружимся, нагоняем ужасы ...
Теги
edit field, lookup, overwrite display value

 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
dynamicsaxtraining: How to access field in a table using this field id Blog bot DAX Blogs 0 09.12.2010 02:13
dynamicsaxtraining: How dynamically change data source field properties Blog bot DAX Blogs 0 06.12.2010 23:11
daxdilip: Tip: How to display the AOS Name at the status bar Blog bot DAX Blogs 5 15.11.2010 13:55
Зачем нужны display и edit методы Андре DAX: Программирование 4 15.08.2002 13:24
edit и display методы Maxim Gorbunov DAX: База знаний и проекты 4 15.01.2002 12:58

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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 03:16.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.