0
votes

How do i get value from Checkedit (CheckBox) in RibbonBar DevExpress C#

i spent hours to surf google , I found little bit regarding this context but this is in VB , i need in C#

This is what i found in VB Please help me Thanks

` Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load

End Sub

Private Sub repositoryItemCheckEdit1_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles repositoryItemCheckEdit1.CheckedChanged
    Dim edit As CheckEdit = TryCast(sender, CheckEdit)
    XtraMessageBox.Show(edit.Checked.ToString())
End Sub

Private Sub repositoryItemCheckEdit1_EditValueChanged(ByVal sender As Object, ByVal e As EventArgs) Handles repositoryItemCheckEdit1.EditValueChanged

End Sub`
1

1 Answers

0
votes

Using the EditValueChanged property I was able to solve this.

Select the item -> Events -> Double click EditValueChanged and add the code below:Ribbon Bar Events

    bool isChecked = false;

    private void barEditItem1_EditValueChanged(object sender, EventArgs e)
    {
        if (barEditItem1.EditValue.ToString() == "False")
        {
           isChecked = false;
        }
        else
        {
           isChecked = true;
        }
    }

enter image description here