This is a migrated thread and some comments may be shown as answers.

RadButton DialogResult does not work

3 Answers 53 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
ManniAT
Top achievements
Rank 2
ManniAT asked on 28 May 2008, 11:05 AM
Hi,

I created a simple dialg with a "Yes" and a "No" Button (Forms.Button).
As Dialog Result i set the Values Yes and No to the buttons.

Clicking the buttons closes the Dialog with the expected resutl.

When I use RadButton instead the dialog does NOT close!!!

Of course I can add a handler wiht
DialogResul=....

But the RadButton has a different behavior to the Forms.Button or in other words:
The porperty "DialogResult" has no effect.

Regards

Manfred

3 Answers, 1 is accepted

Sort by
0
Accepted
Martin Vasilev
Telerik team
answered on 30 May 2008, 12:34 PM
Hi Manfred Pohler,

Thank you for writing.

We are aware of the RadButton and DialogResult issue. We will address it in one of our future releases.
Currently, you could achieve the desired behavior by using the button Click event. Please consult the code-block below:

private void radOKButton_Click(object sender, EventArgs e)   
{   
    Form currentForm = radOKButton.FindForm();   
    currentForm.DialogResult = DialogResult.OK; 
    currentForm.Close();   
}  

I hope this helps. If you have other questions, do not hesitate to contact me again.

Kind regards,
Martin Vasilev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
ManniAT
Top achievements
Rank 2
answered on 30 May 2008, 02:58 PM
Hi,

thanks for the answer.
The reason for my post was to inform you about this bug.

And the solution (workaround) is simply place
DialogResult=DialogResult.No;
into the button handler.

Im'n not sure why you need three lines of code :)

Anyhow - this problem seems to be introduced with Q1 release.
Which means - I have to completely review an app since a lot of dialog no longer take care of "ESC" button and so on.

Regards

Manfred
0
Kiril
Telerik team
answered on 30 May 2008, 03:52 PM
Hi Manfred Pohler,

Thank you for bringing our attention to this issue and for sharing your solution with the community.

We will address this issue as soon as we can.

Your Telerik points have been updated.

Regards,
Kiril
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
ManniAT
Top achievements
Rank 2
Answers by
Martin Vasilev
Telerik team
ManniAT
Top achievements
Rank 2
Kiril
Telerik team
Share this question
or