Void updatedesign ()
{
Formdataobject flditemname;
// Only allow the item name to be modified if it's a service item
//
// Notice that this effects the controls both on the grid, and on the General tab.
Flditemname = inventtable_ds.object (fieldnum (inventtable, itemname ));
Flditemname. allowedit (inventtable. itemtype = itemtype: Service );
}
// Disable editing of all fields
To prevent editing code when you add fields to the table, call the fieldproperties using the dictionary classes:
void setfieldsallowedit () // This is the method in the data source
{< br> formdataobject flditemname;
Boolean allowedit = false; // This wocould set according to some criteria
sysdicttable dicttable = new sysdicttable (this. table ();
fieldid currentfieldid;
;< br> for (currentfieldid = dicttable. fieldnext (0); currentfieldid = dicttable. fieldnext (currentfieldid)
{< br> flditemname = This. object (currentfieldid);
If (flditemname)
flditemname. allowedit (allowedit);
}< BR >}