Try using the wizard to set extended properties. I will do all of the code for you. See what it does.
Yes the wizard asks me to select a view.
The view should be there. Something isnāt set up right. Why isnāt your view loaded on form load?
because iām not selecting new, iām searching.
The view is supposed to be there, whether itās populated or not. Searching should be populating the view.
Without having your customization, I canāt tell whatās going on enough to help you.
I have this on form load
private void SetExtendedProperties()
{
// Begin Wizard Added EpiDataView Initialization
EpiDataView edvGLBudgetHd = ((EpiDataView)(this.oTrans.EpiDataViews["GLBudgetHd"]));
// End Wizard Added EpiDataView Initialization
// Begin Wizard Added Conditional Block
if (edvGLBudgetHd.dataView.Table.Columns.Contains("BalanceAcct"))
{
// Begin Wizard Added ExtendedProperty Settings: edvGLBudgetHd-BalanceAcct
edvGLBudgetHd.dataView.Table.Columns["BalanceAcct"].ExtendedProperties["ReadOnly"] = true;
// End Wizard Added ExtendedProperty Settings: edvGLBudgetHd-BalanceAcct
}
if (edvGLBudgetHd.dataView.Table.Columns.Contains("BudgetCodeID"))
{
// Begin Wizard Added ExtendedProperty Settings: edvGLBudgetHd-BudgetCodeID
edvGLBudgetHd.dataView.Table.Columns["BudgetCodeID"].ExtendedProperties["ReadOnly"] = true;
// End Wizard Added ExtendedProperty Settings: edvGLBudgetHd-BudgetCodeID
}
if (edvGLBudgetHd.dataView.Table.Columns.Contains("BookID"))
{
// Begin Wizard Added ExtendedProperty Settings: edvGLBudgetHd-BookID
edvGLBudgetHd.dataView.Table.Columns["BookID"].ExtendedProperties["ReadOnly"] = true;
// End Wizard Added ExtendedProperty Settings: edvGLBudgetHd-BookID
}
if (edvGLBudgetHd.dataView.Table.Columns.Contains("FiscalYear"))
{
// Begin Wizard Added ExtendedProperty Settings: edvGLBudgetHd-FiscalYear
edvGLBudgetHd.dataView.Table.Columns["FiscalYear"].ExtendedProperties["ReadOnly"] = true;
// End Wizard Added ExtendedProperty Settings: edvGLBudgetHd-FiscalYear
}
// End Wizard Added Conditional Block
}
Can you export your customization and post it? āIt doesnāt workā isnāt enough information.
The view that you are looking for is already there, why canāt you use that one?
thatās the one I am using. I provided code above
I donāt understand what your problem is them.
the fields arenāt read only when I open the form
If nothing is populated, what does that matter? Once you populate the dataview, whatever they type in gets blown away.