Print Page | Close Window

[Resolved]MyViewContext to type IBindingViewContext

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=465
Printed Date: 11-Jun-2026 at 7:36pm


Topic: [Resolved]MyViewContext to type IBindingViewContext
Posted By: orcities
Subject: [Resolved]MyViewContext to type IBindingViewContext
Date Posted: 03-Oct-2007 at 8:57am
I have altered my famous ThreePanelView a bit from what was in the example. I have added an additional panel that holds a combobox. When the combo box index is changed it changes the values in one of the grids.
 
I have created the view, context and presenter. But when I go to run it I get the following error:
Unable to cast object of type 'LOC.CEMS.SecurityModule.DataStoreViewContext' to type 'IdeaBlade.Cab.Interface.IBindingViewContext'.
 
I cannot find an example on what I should do to fix this. My combobox view has it's own presenter DataStoreViewPresenter. In it I have one method, other then OnViewContextSet, that gets the BindingSource from the DataStoreViewContext.
 
The DataStoreViewPresenter inherits from BasicControlViewPresenter.
 
Not sure what I should change to make them compatable. I have tried a variety of things and nothing has worked. DataStoreViewContext inherits form ViewContextBase.



Replies:
Posted By: orcities
Date Posted: 03-Oct-2007 at 9:33am
If I try to inherit the presenter from the  AppViewPresenter<IAppView> like the ActionViewPresenter. I get the following error:
 
"Unable to cast object of type 'LOC.CEMS.SecurityModule.DataStoreViewPresenter' to type 'IdeaBlade.Cab.Interface.IControlViewPresenter'."


Posted By: orcities
Date Posted: 03-Oct-2007 at 9:34am
I was inheriting the view from the wrong class.
 
I changed it to AppView. And so far no error. Still other issues.



Print Page | Close Window