New Posts New Posts RSS Feed: First ReadOnly relation is always retrieved
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

First ReadOnly relation is always retrieved

 Post Reply Post Reply
Author
agrogers View Drop Down
Groupie
Groupie
Avatar

Joined: 11-Mar-2010
Posts: 41
Post Options Post Options   Quote agrogers Quote  Post ReplyReply Direct Link To This Post Topic: First ReadOnly relation is always retrieved
    Posted: 07-Sep-2011 at 12:29am
We have found what seems like a weird problem.  We have a list of Names being displayed in a DevEx grid.  When those names are displayed in the grid there is an extra unnecessary query being fired against the DB.  That query was retrieving all related student records and the relation happened to be the first in the list.

We could not work out why that one was firing so we decided to change it to a non-readonly relation.  That fixed our problem :)

But now the *next* read-only relation (now the first read-only relation) in the list is being fired for each row in the grid. 

Is this by design?  If so, what is the reason for this design?  If not, is there a way to stop these additional queries?

Thanks
Andrew
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 07-Sep-2011 at 7:33pm
We have seen this before with the XtraGrid.  When EnableMasterViewMode is enabled, the grid will call the getter for the first list property of the bound type, apparently to determine whether to display the + icon.  If you aren't displaying detail records then setting OptionsDetail.EnableMasterViewMode to false should stop this behavior.
Back to Top
agrogers View Drop Down
Groupie
Groupie
Avatar

Joined: 11-Mar-2010
Posts: 41
Post Options Post Options   Quote agrogers Quote  Post ReplyReply Direct Link To This Post Posted: 07-Sep-2011 at 9:20pm
Ahh, that sounds like it.  Will test this and post my results.  Thanks Kim
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down