0

In my Form I add RibbonControl. I need to work with RadioButton in that RibbonControl Group. In normal MS Visual Studio radiobox I wrote code like this

if(gender.Checked) {//code} on CheckedChanged Event

but i didn't find checkedChanged Event in RadioGruop in Ribbon Control.

platon
  • 5,310
  • 1
  • 22
  • 24
Srihari
  • 2,387
  • 9
  • 51
  • 82

1 Answers1

2

You need to use EditValueChanged event and EditValue of BarEditItem will be having the value of RadioGroupItem.

Or use SelectedIndexChanged of RepositoryItemRadioGroup

repositoryItemRadioGroup1.SelectedIndexChanged += repositoryItemRadioGroup1_SelectedIndexChanged;
void repositoryItemRadioGroup1_SelectedIndexChanged(object sender, EventArgs e)
{
    RadioGroup rg = (RadioGroup)sender;
    int index = rg.SelectedIndex;
    MessageBox.Show(index.ToString());
}

You may find this helpful. http://www.devexpress.com/Support/Center/Question/Details/Q295970

Sriram Sakthivel
  • 72,067
  • 7
  • 111
  • 189
  • Hi Sriram, I have doubt in RadiotGroup. In BeforeLeaveRow Event I have code to calculate Total, this Total is different calculation according to selected RadioButton in the RadioGroup. I dono how to perform this, Help me. – Srihari Dec 13 '13 at 10:49
  • For example I need to get the Selected RadioButton and then perform calculation. `IF(BarEditItem1.Index=0) { //code }else if(BarEditItem1.Index=0) {//code} ` like this. – Srihari Dec 13 '13 at 10:55
  • @SriHari Raise a new question with explaining about the problem and link it here i'll look at it – Sriram Sakthivel Dec 13 '13 at 11:01
  • [Link-Problem on Working with RadioGroup](http://stackoverflow.com/questions/20567669/how-to-work-with-radiogroup-in-ribboncontrol-in-winforms-devexpress) – Srihari Dec 13 '13 at 13:26