How to Handle ItemCommand event for DataGrid ???
Ans.
suppose, you have two button columns in your datagrid , now,
when u click either of the button ItemCommand event will be
fired...Now, how to distinguish between those two Button
Columns ( Which button is pressed )
}
again it is simple ....
Ans.
Item Command event will holds two objects..
1. Object source,
2. System.Web.UI.WebControls.DataGridCommandEventArgs e
by using 'e' now see the magic
if ((LinkButton)e.CommandSource).CommandName == "Edit")
(just typecast the type of your source)
that's it ... :))
.net Tutorials
2 comments:
Hey NAgendra... Done a great job man... Y dont you put some links of good tutorial stuff also...
Hi Nagendra , This Blog is really useful man .. Keep doing
Post a Comment