Ticket T109914
Visible to All Users

The "permissionRequest.TargetObject incompatible with targetObject.GetType()" error occurs in MasterDetailViewController with a custom master-detail implementation from eXpand Framework

created 11 years ago (modified 11 years ago)

Hello dear support,

im using the module common.win from the XVideoRental in my own application.
(Mainly to use the Import-functionality)

Now i wanted to use the Master-Detail-Feature.

I get an InvalidCast Exception when 'expand' an MasterRow.

The DetailView is correctly shown, but a MessageBox with that Exception occurs.

Can anybody give me a hint for that?

23.05.14 16:40:13.670    ================================================================================
The error occurred:

Type:       InvalidOperationException
    Message:    Exception occurs while assigning the 'ListView, ID:Schweisser_Pruefungen_ListView' view to WinWindow:
permissionRequest.TargetObject incompatible with targetObject.GetType()
    Data:       0 entries
    Stack trace:

bei DevExpress.ExpressApp.Frame.SetView(View view, Boolean updateControllers, Frame sourceFrame)
   bei Common.Win.GridView.MasterDetail.GridViewBuilder.ModifyGridViewInstance(IMasterDetailColumnView masterGridView, Int32 rowHandle, Int32 relationIndex, IModelListView masterModelListView, List`1 masterDetailRules) in d:\Visual Studio 2012\Projects\Common.Win\Common.Win\GridView\MasterDetail\MasterDetailBuilders.cs:Zeile 88.
   bei Common.Win.GridView.MasterDetail.MasterDetailViewController.Grid_ViewRegistered(Object sender, ViewOperationEventArgs e) in d:\Visual Studio 2012\Projects\Common.Win\Common.Win\GridView\MasterDetail\MasterDetailViewController.cs:Zeile 195.
   bei DevExpress.XtraGrid.Views.Grid.GridView.SetMasterRowExpandedEx(Int32 rowHandle, Int32 relationIndex, Boolean expand)
   bei DevExpress.XtraGrid.Views.Grid.GridView.VisualSetMasterRowExpandedEx(Int32 rowHandle, Int32 relationIndex, Boolean expand)
   bei DevExpress.XtraGrid.Views.Grid.Handler.GridRegularRowNavigator.OnMouseDown(GridHitInfo hitInfo, DXMouseEventArgs e)
   bei DevExpress.XtraGrid.Views.Grid.Handler.GridHandler.OnMouseDown(MouseEventArgs ev)
   bei DevExpress.Utils.Controls.BaseHandler.ProcessEvent(EventType etype, Object args)

InnerException:

Type:       InvalidCastException
            Message:    permissionRequest.TargetObject incompatible with targetObject.GetType()
            Data:       0 entries
            Stack trace:

bei DevExpress.ExpressApp.Security.ServerPermissionRequestProcessor.GetTypeToProcess(Type targetType, Object targetObject)
   bei DevExpress.ExpressApp.Security.ServerPermissionRequestProcessor.IsGrantedCore(ServerPermissionRequest permissionRequest, IPermissionDictionary permissions, Boolean needToCheckBackReference)
   bei DevExpress.ExpressApp.DataManipulationRight.CanDelete(Type type, Object targetObject, CollectionSourceBase collectionSourceBase, IObjectSpace objectSpace)
   bei DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController.UpdateActionState()
   bei DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController.DoUpdateActionState()
   bei System.EventHandler.Invoke(Object sender, EventArgs e)
   bei Common.Win.GridView.GridListEditorBase.OnSelectionChanged() in d:\Visual Studio 2012\Projects\Common.Win\Common.Win\GridView\GridListEditorBase.cs:Zeile 811.
   bei Common.Win.GridView.GridListEditorBase.gridView_SelectionChanged(Object sender, SelectionChangedEventArgs e) in d:\Visual Studio 2012\Projects\Common.Win\Common.Win\GridView\GridListEditorBase.cs:Zeile 357.
   bei DevExpress.Data.SelectionChangedEventHandler.Invoke(Object sender, SelectionChangedEventArgs e)

Show previous comments (2)
TV TV
Thomas Vetterling 11 years ago

    So, if I understand you correctly, i should try to switch off the security system. Just Tod check whether this is the reason? It also occurs when logged in AS an admin.
    My question is which types are 'compared'… perhaps my model has an error… thats why im asking.

    Apostolis Bekiaris (DevExpress) 11 years ago

      Hello,

      Yes switching of security is not a solution, From the info you posted it looked like a non supported Security issue with master-detail objects. Also from the trace I can understand that there is a miss configuration in your detailed listview. If you want us to examine the case further please post a sample.

      TV TV
      Thomas Vetterling 11 years ago

        Hello, dear supporters,
        I will try to pack one tomorrow at work. Thank You for your answers so far.
        Thomas

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.