Показать сообщение отдельно
Старый 18.12.2006, 16:27   #4  
MironovI is offline
MironovI
Участник
 
724 / 77 (4) ++++
Регистрация: 30.05.2005
Этому способу лет триста наверное - в active датасорса разрешаешь его на редактирование, потом закрываешь все поля нижепреведенным методом и после этого свое одно открываешь.

protected void allowEditCustInvoiceJourFields(boolean _allowEdit)
{
DictTable dictTable;
FieldID field;
int cx, iCnt;

DictField dictField;
ArrayIdx idx;



void setAllowEditValue(FieldID _field)
{
custInvoiceJour_ds.object(_field).allowEdit(_allowEdit);
};


dictTable = new DictTable(tablenum(CustInvoiceJour));

iCnt = dictTable.fieldCnt();

for(cx = 1; cx <= iCnt; cx++)
{
field = dictTable.fieldCnt2Id(cx);

dictField = dictTable.fieldObject(field);

if(! dictField.isSystem())
{//Not system field

if(dictField.arraySize() == 0)
//Field isn't array
setAllowEditValue(field);
else
{//Field is array

for(idx = 1; idx <= dictField.arraySize(); idx++)
{
setAllowEditValue(fieldId2Ext(field, idx));
}
}
}
}
}