Monday, February 2, 2009

Open Window on click (Select) on gridview asp.net c# 2.0

protected

void gridViewMaster_RowDataBound(object sender, GridViewRowEventArgs e)

{

if (e.Row.RowType == DataControlRowType.DataRow)

{

e.Row.Attributes[

"onmouseover"] = "this.style.cursor='hand';this.style.textDecoration='underline';";

e.Row.Attributes[

"onmouseout"] = "this.style.textDecoration='none';";

e.Row.Attributes[

"onclick"] = ClientScript.GetPostBackClientHyperlink(this.GridView1, "Select$" + e.Row.RowIndex);

//e.Row.Attributes["onclick"] = ClientScript.GetPostBackClientHyperlink(this.GridView1, "Select$" + e.Row.RowIndex);

e.Row.Attributes.Add(

"onclick", "window.navigate('editrawdata.aspx?LeadID=" + DataBinder.Eval(e.Row.DataItem, "UKID") + "','myprofilewindow','width=400,height=600,toolbar=0,resizable=0');");

}

No comments: