Data Access Worldwide Knowledge Base
Article ID 2098 Article Title PROBLEM: Combo in grid does not set Changed_State Article URL http://www.dataaccess.com/kbasepublic/KBPrint.asp?ArticleID=2098 KBase Category VDF11 Date Created 03/25/2005 Last Edit Date 03/25/2005
Article Text
PROBLEM:
This issue can be seen in the Contacts example.
- Find a contact
- Add a new phone number then press Tab -- the descrition gets filled with Work.
- Press F2 to save the change. The save happens; the number is saved. However, the description (Work) is not saved as the Changed_State of that column is not changed.
Unless you actually choose an item from the combo, there is a problem. To the end-user
it appears that 'Work' should be saved but it is not. The combo only displays its first item but nothing else happens.
SOLUTION:
This can be corrected by adding a default value to the DD for Numbers.description to "Work" (we will do this in the sample).
At the moment, I think we have to leave this as a "don't do this". This is using a combo that does not allow entry (Column_Combo_Entry_State = False) so the value has to come from the combo-list, which is a validation table. Since we don't have a default value, the combo doesn't know what to display, so it displays the first value. The grid is doing this internally and it is not setting changed state. It is questionable if changed_state should get set here. Basically, we are putting the combo in a difficult situation and it is not responding well. The best thing to do is to not put the combo in the difficult situation. This could be avoided by:
1. Setting a default in the DD for this value (the best solution)
or
2. Allow blanks in the validation list
or
3. Set the Column_Combo_Entry_State to false.
Restated, don't create column_combo_entry_state=True combos without making sure that the cell always has a valid value.
Contributed By:
John Tuohy
Company: Data Access Worldwide
Web Site: http://www.dataaccess.com
Email this Article
Email this Article to a Colleague
Send Feedback on this Article to Data Access Worldwide
Copyright ©2010 Data Access Corporation. All rights reserved.
The information provided in the Data Access Technical Knowledge Base is provided "as is" without warranty of any kind. Data Access Corporation disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Data Access Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Data Access Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.