hi,
I have created radiobutton in Listbox control at runtime and set different values for each radiobutton using tag property.
How can I get the corresponding Tag value When I check on any Radio Button.
Please help me on this.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Master BillaPosted Aug 13, 2009, 4:45 AM
Just you can this code to that
private void RadioButton_Checked(object sender, RoutedEventArgs e)
{
RadioButton ds = (RadioButton)e.OriginalSource;
object tag = ds.Tag;
}
if it help all my previous and current post , please mark it answer.
thank you
Ashok PPosted Aug 13, 2009, 4:38 AM
private void OnOptionCheck(object sender, EventArgs e)
{
var obj = sender as SurfaceRadioButton;
//obj.Tag
}
In the above code I can able to get the value on RadioButton Check event, But it shows in following format when i look into Watch window
obj.Tag {Attribute, Name="score", Value="15"} object {System.Xml.XmlAttribute}
How can I get the tag value from the object 'obj'?
Master BillaPosted Aug 13, 2009, 4:14 AM
Yes u think my code help to earlier to create radio button in lisbox, now you need access the radio buttons.
And if you are bind like my code the radio button has Product object
so you need access like this way that control
Thank you