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

how do i set ToggleType?

2 Answers 47 Views
Button
This is a migrated thread and some comments may be shown as answers.
moegal
Top achievements
Rank 1
moegal asked on 12 Oct 2012, 02:43 AM
this does not work.

RadButton myBtn = new RadButton();
     myBtn.Text = "Button";
     myBtn.ToggleType="Radio";
     PlaceHolder1.Controls.Add(myBtn);

Any help would be appreciated

Marty

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 12 Oct 2012, 03:16 AM
Hi Marty,

Try the following code snippet to set ToggleType property of a RadButton.

C#:
RadButton myBtn = new RadButton();
myBtn.Text = "Button";
myBtn.ButtonType = RadButtonType.ToggleButton;
myBtn.ToggleType = ButtonToggleType.Radio;
PlaceHolder1.Controls.Add(myBtn);

Hope this helps.

Regards,
Princy.
0
moegal
Top achievements
Rank 1
answered on 12 Oct 2012, 10:10 AM
thanks! That is just what I was looking for!

Marty
Tags
Button
Asked by
moegal
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
moegal
Top achievements
Rank 1
Share this question
or