Beispiel #1
0
        protected void GridView1_RowDeleting(object sender, System.Web.UI.WebControls.GridViewDeleteEventArgs e)
        {
            var studentList = StudentDatabase.StudentList();

            studentList.RemoveAll((x) => x.FirstName == GridView1.DataKeys[e.RowIndex].Values[0].ToString());

            GridView1.DataSource = studentList;

            GridView1.DataBind();
        }
Beispiel #2
0
 protected void GridView1_RowEditing(object sender, System.Web.UI.WebControls.GridViewEditEventArgs e)
 {
     GridView1.DataSource = StudentDatabase.StudentList();
 }
Beispiel #3
0
 protected void viewDetails_Click(object sender, EventArgs e)
 {
     GridView1.DataSource = StudentDatabase.StudentList();
     GridView1.DataBind();
 }