TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Anele Ngqandu
NA
19
38.6k
Execute an event when a specific button inside a gridview is clicked
Oct 14 2011 3:34 PM
Hi
I have a list of buttons inside my gridview cells, now i need each button to execute a difrent event when its clicked. how can i solve this?
I tried to put this on Page_Load but not working
foreach (GridViewRow rowItem in GridView1.Rows)
{
Button btnMonday = (Button)(GridView1.Rows[0].Cells[1].FindControl("btnMonday"));
btnMonday.Click += new EventHandler(this.mondae_Click);
Button btnTuesday = (Button)(GridView1.Rows[0].Cells[2].FindControl("btnMonday"));
btnTuesday .Click += new EventHandler(this.mondae_Click);
}
What should i do or where should i put it??
Reply
Answers (
2
)
Crop image without pixel colour change
How to edit a value in Database Table Row by typing inside datagrid ?