I have a few reasons that I need this to happen, but suffice it to say that when I use the event handler for the RadioButtonList the sender object returns as just the RadioButtonList, and I need more information from the GridView because that's how I can uniquely identify which record my RadioButtonList is tied to.
I added an "OnSelectedIndexChanged" property to my GridView but it doesn't fire/handle when I want it to. I'm assuming this has something to do with the way the GridView is designed to work.
Does anyone have any suggestions on how to do this or a better alternative?
I also thought about using a hidden field, but I can't add it to the RadioButtonList so it won't help unless it's global. The problem with it being global is that I can't set the value uniquely to the record that has it's RadioButtonList being altered.
Clear as mud? Please ask if you need any clarification.
Thanks in advance!
Just thought I would add an answer and explain how I solved my issue.
Since the scope was too narrow, I needed to add a custom field to the radiobuttonlist. I just went ahead and added the following code:
MyRadioButtonList.Attributes.Add("NecessaryField")
I added this so that everytime a grid view row was databound this code would aldo execute, ensuring that every RadioButtonList had this field.
After that it's available for use.