First ReadOnly relation is always retrieved
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=2952
Printed Date: 21-Jan-2026 at 5:43pm
Topic: First ReadOnly relation is always retrieved
Posted By: agrogers
Subject: First ReadOnly relation is always retrieved
Date 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
|
Replies:
Posted By: kimj
Date 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.
|
Posted By: agrogers
Date Posted: 07-Sep-2011 at 9:20pm
|
Ahh, that sounds like it. Will test this and post my results. Thanks Kim
|
|