I have this working for Sales Orders with this in the class LineCustomFieldPlugin:
- Code: Select all
public void FormatCell(IJiwaBusinessLogic BusinessLogicHost, JiwaGrid GridObject, IJiwaForm FormObject, int Col, int Row, IJiwaLineCustomFieldValues HostItem,
CustomField CustomField, CustomFieldValue CustomFieldValue)
{
string pluginName = CustomField.PluginCustomField.CustomFieldCollection.Plugin.Name;
if (FormObject is SalesOrderEntryForm)
{
var salesOrderForm = (SalesOrderEntryForm)FormObject;
salesOrderForm.LineCustomSettingValuesDisplayed += delegate
{
int rowCount = salesOrderForm.grdLines.ActiveSheet.RowCount;
if (Row >= rowCount) return;
GridObject.LockColumn(true, string.Format("{0}.{1}", pluginName, "CustomFieldName"), Row);
};
}
}
However, Purchase Order doesn't seem to have LineCustomSettingValuesDisplayed and none of the events I tried worked. Is there an equivalent event I can use?