Could someone please help?
I have a datagrid and inside it, i have a button. I also create "ItemCreated" below for this button inside the datagrid. But when i debug the application, i see this "ItemCreated" function run so many time over and over again. What should i do? I only want it run once when I click on the button inside the datagrid. Where should i put this function? I really appreciate your help.
Sub dgProgram_ItemCreated(ByVal sender As Object, ByVal e As DataGridItemEventArgs) Handles dgProgram.ItemCreated
If e.Item.ItemType = ListItemType.Item OrElse e.Item.ItemType = ListItemType.AlternatingItem Then
Me.program.Value = e.Item.Cells(1).Text
Dim btn As Button
btn = e.Item.Cells(14).Controls(0)
'btn.Attributes.Add("onclick", "return testing();")
End If
End sub
Loading
Jan MontanoPosted Jul 3, 2007, 11:50 PM
Try reposting your message at the C# Language Section because most users are browsing that section. Other's may have an answer to your question there.