Ticket Q382084
Visible to All Users

Grid shows empty cells for lookup column

created 13 years ago

I've seen this behavior off and on but could never reproduce it consistently until now. It appears to happen only when using the IdeaBlade DevForce XtraGridBindingManager control to communicate with a database through the IdeaBlade layer. However, the problem does *not* appear to be with IdeaBlade because I can see that the proper data is looked up in memory but it is just not being displayed correctly on the screen.
What I'm trying to do is to display the contents of a master table and one column of a detail table inside one grid. Because a one-to-many relationship exists in the database between the master and the detail tables, that grid column is formatted as a LookupEdit column.
To repro:

  1. Run the attached script.sql file to create a simple database on a default local instance of SQL Server 2008. This script creates a table Master and a table Details and populates them with the necessary data.
  2. Build and run the solution. When the application window shows, you will see one or more cells of the Details column in the grid show up empty.
    When I tried to reproduce this scenario with XML datasets, the grid worked properly. This seems to suggest that the problem lies with how the XtraGrid control gets its data source bound to the XtraGridBindingManager control.
Show previous comments (4)
DevExpress Support Team 13 years ago

    Hi Steven,
    Thank you for the attached project. It helped me reproduce this problem. The issue is caused by the fact that GridControl cannot correctly operate complex data types as in case of the Detail class. To operate these data types, I suggest you use unbound columns. If you do not want to use them, I suggest you contact the IdeaBlade support team to resolve this problem.
    The
    Thanks,
    John.

      I've tried using an unbound column following the example at http://documentation.devexpress.com/#WindowsForms/CustomDocument1477, but I'm stuck. I can't get the lookup edit control to display the right information or respond to changes. I've attached an updated sample project of what I have. Can someone please show me what I'm missing?

      DevExpress Support Team 13 years ago

        Hi Steven,
        I cannot provide an exact answer as I have no experience of working with IdeaBlade components and their data structure. I suggest you contact the IdeaBlade support team to resolve this problem.
        Thanks,
        John.

        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.