I have set up a grid with a Master-Detail relationship. Each view is associated to a TClientDataSet. The detail view > MasterKeyFieldNames property has been set to match the key name of the Master View. The detail view > DetailKeyFieldNames property has been set to match the key name of the Detail View. The detail view > KeyFieldNames property has been set to match the key name of the Detail View.
When I run the program the data displays properly at first. However, when I enter one of the fields on the Detail grid I get the error "Key Field not found". There is always one row that does not give the "Key Field not found" error, but in that row the highlighted cell displays data from another cell until another cell is selected.
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.
Hello Karen,
Thank you for the message.
This error occurs because your dsDetail dataset doesn't contain the cdsKeyFieldName field.
You should assign an existent column to the TcxDBDataController.KeyFieldNames property.
For more information, please read the "Master-Detail" topic.
Thanks,
Valdemar