Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
ItemCreated of Datagrid using vb
Don To
17y
3.2k
1
Reply
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
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Audio/Video player - URGENT
Setting Datasource property of mdb Database location or path automatically without using App.config File