Hello to all,
XAF my application. Ver 18.2.8. in use web project.
I migrated xaf 17.2.9 vs 18.2.8 bat many problems related to Frame is Null.
this code has always worked well, it's a controller that will disable the "New" action button in the "LookupProperty" in the main DetailView .
C# if (this.View.Id.Contains("RdL_DetailView") && this.View.ViewEditMode == ViewEditMode.Edit)
if (this.View.FindItem("Categoria") != null)
{//
if (!(this.View.FindItem("Categoria").GetType().Name.Contains("ProtectedContent")))
{
ViewItem property_Problema_g = this.View.FindItem("Categoria");
if (property_Problema_g is DevExpress.ExpressApp.Web.Editors.ASPx.ASPxLookupPropertyEditor)
if (((DevExpress.ExpressApp.Web.Editors.ASPx.ASPxLookupPropertyEditor)(property_Problema_g)).Frame != null)
{
NewObjectViewController newObjDetailViewControllerWeb = ((DevExpress.ExpressApp.Web.Editors.ASPx.ASPxLookupPropertyEditor)
(property_Problema_g)).Frame.GetController<NewObjectViewController>();
//newObjDetailViewControllerWeb.ObjectCreated += RdL_DetailView_Gestione_Problema_controler_ObjectCreated;
newObjDetailViewControllerWeb.Active.SetItemValue("New", false);
}
else
{
((DevExpress.ExpressApp.Web.Editors.ASPx.ASPxLookupPropertyEditor)(property_Problema_g)).InitializeFrame();
NewObjectViewController newObjDetailViewControllerWeb = ((DevExpress.ExpressApp.Web.Editors.ASPx.ASPxLookupPropertyEditor)
(property_Problema_g)).Frame.GetController<NewObjectViewController>();
//newObjDetailViewControllerWeb.ObjectCreated += RdL_DetailView_Gestione_Problema_controler_ObjectCreated;
newObjDetailViewControllerWeb.Active.SetItemValue("New", false);
}
}
}
see Attachment. I would like to disable this button,
how can i do that from code, and how can i do that from module?
this is mai controller,
and in debuger have Frame value is null.
also after ".InitializeFrame ();"