I want to use these 2 properties Enabled vs. Read-Only but it is different from normal control of windows
I understand that if I use Enabled to lock the data, I won’t be able to take advantage of the contextmenustrip of the epicor built open with…
But I use Read-Only attribute to take advantage of the context menu of the epicor system, when I press new control, it automatically opens for the user to edit data, I can add setting this attribute again. when adding new
private void CostForm_Load(object sender, EventArgs args)
{
// Add Event Handler Code
SysMonitorTasksAdapter adapterSysMonitorTasks = new SysMonitorTasksAdapter(this.oTrans);
adapterSysMonitorTasks.BOConnect();
Ice.Lib.Searches.SearchOptions opts = new SearchOptions(SearchMode.AutoSearch);
opts.DataSetMode = DataSetMode.RowsDataSet;
bool morePages = false;
string whereClause = string.Format("SubmitUser='{0}' and TaskDescription='Load Costing Workbench Details' and Company='{1}'",session.UserID,session.CompanyID);
opts.NamedSearch.WhereClauses.Add("SysTask", whereClause);
// Call Adapter method
SysMonitorTasksDataSet dsSysMonitorTasks = (SysMonitorTasksDataSet)adapterSysMonitorTasks.GetRows(opts, out morePages);
countLoad=dsSysMonitorTasks.Tables[0].Rows.Count;
txtGroup.ReadOnly = true;
}
but if in windows system only need to set 1 time in form load, if there is no place open, it will not be able to open? Here why when creating a new system from reopening the property that is already set
Read-Only=true in from load this will easily cause errors if the writer does not pay attention
When you get an old group, it won’t be able to fix it
but when the new group is new, the groupid will be fixed even though readonly is set in the load form
Good to know. Thanks! Have a nice day!