protected void grdview_srchresult_SelectedIndexChanged(object sender, EventArgs e) {
//for MessageBox
//Page.RegisterStartupScript("StatusMessage", "
");
GridViewRow gd = grdview_srchresult.SelectedRow;
Response.Write(gd.Cells[1].Text.ToString());//zipcode
}
protected void grdview_srchresult_RowDataBound(object sender, GridViewRowEventArgs e) {
if (e.Row.RowType == DataControlRowType.DataRow)
{
//for designing gridview
e.Row.Attributes["onmouseover"] = "this.style.cursor='hand';this.style.background='#D1DDF1'";
e.Row.Attributes["onmouseout"] = "this.style.textDecoration='none';this.style.background='#EFF3FB'";
//for selecting particular record
e.Row.Attributes["onclick"] = ClientScript.GetPostBackClientHyperlink(this.grdview_srchresult, "Select$" + e.Row.RowIndex );
}
}
No comments:
Post a Comment