Цитата:
Сообщение от
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