Ticket T1287267
Visible to All Users
Duplicate

TcxBarEditItem, RepositoryItem

created 10 days ago

The behavior of a TcxBarEditItem's EditValue has changed when a RepositoryItem (ImageComboBox) is assigned by design:

In older versions of the component the ImageComboBox.Items[0] value was set as default value for the TcxBarEditItem. Now this is not taken into account any more and NULL is set to the EditValue what leads to severe issues in my application as the user have to select a value first instead of having the defaults.

Clipboard-File-1.png

versus

Clipboard-File-2.png

Answers approved by DevExpress Support

created 8 days ago

Hello Anton,

Thank you for the details. In v23.2 and newer, TcxBarEditItem has the ItemIndex property that allows you to select an active item of combobox-like editors programmatically. The new mechanism assigns ItemIndex to -1 if an editor's value is null. When the editor is displayed the first item, its value corresponds to this item as well. While we completely understand the impact on your project, we consider the current behavior correct and decided to keep it since the previous behavior would be ambiguous within the ItemIndex property's mechanism. We recommend you assign the ItemIndex property programmatically to show the first item.

Clipboard-File-1.png

    Comments (2)
    AG AG
    Anton Grabmayr 8 days ago

      Hi, Alex!

      When I look at the ObjectInspector's properties I can't find the ItemIndex property as shown in your screenshot. What is the reason for this?
      Clipboard-File-1.png

      AP AP
      Alex Pa (DevExpress Support) 8 days ago

        Thank you for the screenshot. It looks like this behavior occurs when you use repository items. We will examine it and update the following thread once we have news: TcxBarEditItem - ItemIndex property is not available in object inspector if its in-place editor is specified as a repository item.

        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.