use the asp:ButtonColumn with the Text="<img...>"
They give it a CommandName
Initialize the grids ItemCommand and you should be good to go.
like this....
<asp:DataGrid........ItemCommand="myItemCommand" >
<....>
<asp:ButtonColumn..... CommandName="myCommand"..../>
Then in the codebehind
Private void InitializeComponent()
{
this.myGrid.ItemCommand += new
System.Web.UI.WebControls.DataGridCommandEventHand ler(this.myItemCommand);
}
private void myItemCommand(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
if(e.CommandName == "myCommand")
{
....do your sub here
}
}
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site:
http://www.Darkfalz.com
Blog:
http://blog.Darkfalz.com
"Lerp" <ad***@officience.ca> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
Hi all,
How would I go about creating a link button inside my datagrid that calls
a sub on the same page when clicked....this button will have an image
instead of textual link ie: I don't want a regular <asp:button> tag to do this.
Cheers and thanks, Lerp