How to run a function in GridView's SelectedIndexChanged Event
hi guys on my project ( c# asp.net ) i used a gridview to list the students with their numbers, names, surnames, gpa s, if they assigned on a project, project advisor name,project advisor surname.
Every row has a Assign button. When i clicked the assign button students will be assigned a project with their gpa. The assign function is ready. It is working on a single command button but when i used it in the gridview not. How can i do that?
my code is below
public void BindDataGrid()
DataTable dtPro = DBCodes.DataGetir("SELECT * FROM student");
gvList.DataSource = dtPro;
protected void gvList_SelectedIndexChanged(object sender, EventArgs e)
for (int i = 0; i < gvList.Rows.Count; i++)
GridViewRow row = gvList.SelectedRow;
if (row.Cells.ToString() == "1")
row.Cells.Visible = false;