I am adding template fields in grid-view dynamically
I am adding checkbox column in following way
Dim checkbox As New CheckBox()
checkbox.ID = "chk" & i.ToString
AddHandler checkbox.CheckedChanged, AddressOf ViewDetails
checkbox.Checked = TryCast(e.Row.DataItem, DataRowView).Row("STORE CD").ToString()
checkbox.AutoPostBack = True
checkbox.Checked = True
e.Row.Cells(0).Controls.Add(checkbox)
But function ViewDetails cant be call
please help