Ticket Q147129
Visible to All Users

TcxBarEditItem with TcxCustomCheckGroupProperties

created 16 years ago

Hello,
I can ́t read and write the state for items. States properties is not under TcxCustomCheckGroupProperties.
I have tried this code without success:
bool b = MyBoolean;
          TcxCustomCheckGroup * pcb = new TcxCustomCheckGroup(this);
          pcb->Properties->Assign((TcxCustomCheckGroupProperties *)p->cxBarEditItemConfirmar->Properties);
          pcb->States[0] = b ? cbsChecked : cbsUnchecked;
How can I change states ?
Regards

Answers

created 16 years ago

Hello Carlos,
Thank you for the question. However, I should say that you cannot change states through the TcxCustomCheckGroupProperties class because this object is only used to create an editor and adjust its values. It doesn't store values. To obtain a value, you should use the corresponding BarEditItem's EditValueProperty. After that, you can calculate check states based upon an item's value using the CalculateCheckStates (cxCheckBox.Pas) method. A sample code can be found in the following article: How to determine which Items are checked in the CheckComboBox
Please feel free to contact us if you need any additional assistance in this regard. We will be happy to help you.
Thanks,
Stan.

    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.