protected void grdNotes_RowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            Page.Validate("notesDataEdit");
            if (Page.IsValid)
            {
                int materialId = (int)e.Keys["MaterialID"];
                int refId = (int)e.Keys["RefID"];

                string subject = ((TextBox)grdNotes.Rows[e.RowIndex].Cells[2].FindControl("tbxNoteSubjectEdit")).Text.Trim();
                string Note = ((TextBox)grdNotes.Rows[e.RowIndex].Cells[3].FindControl("tbxNoteNoteEdit")).Text.Trim();

                // Update data
                MaterialsInformationNoteInformation model = new MaterialsInformationNoteInformation(materialsInformationTDS);
                model.Update(materialId, refId, subject, Note);

                // Store dataset
                Session["materialsInformationTDS"] = materialsInformationTDS;
            }
            else
            {
                e.Cancel = true;
            }
        }