Hi Guys,
I want to show a dialog view at startup (after logging in). I'm using the
navigationcontroller and in the CustomShowNavigationItem event I'm creating a new listview
as a dialog. After logging in i'm getting a object not referenced error.
Am I doing something wrong?
void ShowDetailViewFromNaviation_CustomShowNavigationItem(object sender, CustomShowNavigationItemEventArgs e)
{
if (item != null && item.Id.StartsWith("F_CAB_CD_MAIN_GROUP_TYPE_ListView"))
{
createListView(e.ActionArguments.ShowViewParameters, item, typeof(F_CAB_CD_MAIN_GROUP_TYPE));
e.Handled = true;
}
}
private ListView createListView(ShowViewParameters svp, ChoiceActionItem item, Type objType)
{
ObjectSpace os = this.Application.CreateObjectSpace() as ObjectSpace;
var obj = os.CreateObject(objType);
var v = item.Data as ViewShortcut;
var lv = this.Application.CreateListView(os, objType, true);
svp.CreatedView = lv;
svp.Context = TemplateContext.PopupWindow;
svp.TargetWindow = TargetWindow.NewModalWindow;
svp.CreateAllControllers = true;
DialogController dc = Application.CreateController<DialogController>();
svp.Controllers.Add(dc);
return lv;
}
Hi Arjan,
Thank you for your message.
Your code looks fine in general. Please debug your application and detect on which exactly code line you are getting this exception? Does this error occur in your or in DevExpress code?
Also, am I right that you first set the StartupNavigatioItem property in the application model and than provide a custom handling of this startup View?
Feel free to provide your sample project if the provided information does not allow you to determine the cause of the problem yourself.
Thanks,
Dennis
Hi Dennis,
Does this error occur in your or in DevExpress code?
>> The error occurs somewhere in the Devexpress code (see log file)
Also, am I right that you first set the StartupNavigatioItem property in the application model and than provide a custom handling of this startup View?
>> Yes, that's right
Hello Arjan,
Thank you for providing additional information. I will research your problem further and will let you know my results as soon as I can. Please stay tuned!
Thanks,
Dennis