Ticket Q382612
Visible to All Users

Edit Value Changed is not firing until focus is lost

created 13 years ago

I am using a Ribbon Control with a Ribbon Page Group. Inside the group I added a Bar Edit Item that is setup as a Radio Group. I am trying the have the user choose one of the radio group options and then the rest of the form will change in appearance based of the user option. The "EditValueChanged" event is not firing until I click on another part of the form. I realize that there is a "ItemPress" event that fires immediately, however, the value of the "EditValue" property still has not changed and does not change until I intentionally lose focus of the radio group

Answers

created 13 years ago

Hi John,
Thank you for contacting us. BarEditItem.EditValue is changed when an editor should be hidden.You can post the editor's value manually via the RibbonControl.Manager.ActiveEditItemLink.PostEditor method.

C#
private void repositoryItemRadioGroup1_EditValueChanged(object sender, EventArgs e) { ribbon.Manager.ActiveEditItemLink.PostEditor(); }

Thanks,
John.

    Comments (2)

      John,
      Thanks for replying. I may have not made my question clear. The EditValueChanged is not firing so it will not help me to place a call to PostEditor in an event that does not fire unless I intentionally lose focus of the control. If EditValueChanged was firing I would not have this issue. I did try the PostEditor call in the ItemPress event but it is still not changing the EditValue of the control. Just to be clear on what I need. I have a radio group. When the user clicks on one of the options, I want to bring a panel to the front and send the other panel to the back changing the look of the interface. The edit values of the two radio group options are true and false but when I click on one of the options the only event firing is the ItemPress event. The EditValueChanged event does not fire unless I click on some other control. Whats really frustrating is that the actual editValue property is not registering the change. Thanks so much for your efforts on this matter!
      private void rbEncoding_ItemPress(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
              {
                  ribbonControl1.Manager.ActiveEditItemLink.PostEditor();

      if ((Boolean)rbEncoding.EditValue == true)
                  {
                      gbxADI.BringToFront();
                      gbxSpec2000.Visible = true;
                      epc = "urn:epc:tag:adi-var:";
                      lblEPC.Text = epc;
                  }
                  else
                  {
                      gbxSGTIN96.BringToFront();
                      gbxSpec2000.Visible = false;
                      epc = "urn:epc:tag:sgtin-96:";
                      lblEPC.Text = epc;
                  }
              }

      DevExpress Support Team 13 years ago

        Hi John,
        To catch the moment when an edit value is changed, you need to handle the RepositoryItemRadioGroup.EditValueChanged event, not the BarEditItem.EditValueChanged event. The RepositoryItemRadioGroup.EditValueChanged event is raised immediately after an edit value is changed. If you with to access this value, simply cast a sender to the RadioGroup type and use the RadioGroup.EditValue property.
        Please let me know if you need any further assistance.
        Thanks,
        Svetlana

        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.