Tuesday, January 4, 2011

gridview databound event

GridViewRow

{
//ID is field name in grd and searchdetails is the grid id


{
//chkselect is the checkbox in our grid

ckselected.Checked =
}
row = e.Row;if (row.RowIndex >= 0)string ID = Convert.ToString(searchdetails.DataKeys[row.RowIndex].Value);if (selected.Contains(ID))CheckBox ckselected = (CheckBox)row.FindControl("chkSelect");true;else{

ckselected.Checked =
}
}
CheckBox ckselected = (CheckBox)row.FindControl("chkSelect");false;

No comments:

Post a Comment