All pastes #168805 Raw Edit

Anonymous

public text v1 · immutable
·published 2006-09-13 10:24 UTC
rendered paste body
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.DataItemIndex == -1) return;	
e.Row.Attributes.Add("onMouseOver", "this.style.cursor='hand';");
e.Row.Attributes.Add("onclick", ClientScript.GetPostBackEventReference(gvTools, "Edit$" + e.Row.RowIndex.ToString() ) );

// The above code simply writes a postback client event's JavaScript on the "OnClick" event of that control. 
// When we click on the control, it calls the Edit functionality of the DataGrid.
}