L
Luiz Vianna
Folks,
I'm trying to programaly add a RadioButton to my datagrid using this code bellow.
When I run the aspx page the RadioButton apears, but when I click on it, it did not fire
the sub "myRadioButton_Click" as designed bellow...
Any ideas?
Thanks,
Luiz
------
Dim _item As DataGridItem
Dim myRadioButton As New RadioButton
_item = MyDataGrid.Items(1)
myRadioButton.EnableViewState = True
myRadioButton.ID = "RadioButton1"
myRadioButton.GroupName = "RadioGroup1"
myRadioButton.Text = "Alternatives"
AddHandler myRadioButton.CheckedChanged, AddressOf myRadioButton_Click
_item.Cells(2).Controls.Add(myRadioButton)
I'm trying to programaly add a RadioButton to my datagrid using this code bellow.
When I run the aspx page the RadioButton apears, but when I click on it, it did not fire
the sub "myRadioButton_Click" as designed bellow...
Any ideas?
Thanks,
Luiz
------
Dim _item As DataGridItem
Dim myRadioButton As New RadioButton
_item = MyDataGrid.Items(1)
myRadioButton.EnableViewState = True
myRadioButton.ID = "RadioButton1"
myRadioButton.GroupName = "RadioGroup1"
myRadioButton.Text = "Alternatives"
AddHandler myRadioButton.CheckedChanged, AddressOf myRadioButton_Click
_item.Cells(2).Controls.Add(myRadioButton)