Good day,
I am having problem with the saving. all i want is to save multiple records at once. i used user define table in sql server 2008. my stored proc seems be right coz i already tested it..
my problem is that once i selected a record from the first page and move to another page or so.. my selected value seems to be not read in the gridview. all record that they read is the selected record on the active page..
i need some help regarding this..
below is my code for reading the value of selected value..
gvTaggingAccounts.AllowPaging = false;
#region original codes
DataTable dtTable = new DataTable("AcctTaggingType");
dtTable.Columns.Add("AccountNum", typeof(Int32));
dtTable.Columns.Add("AccountName", typeof(string));
DataRow dtRow;
foreach (GridViewRow grRow in gvTaggingAccounts.Rows)
{
CheckBox chkStatus = (CheckBox)grRow.FindControl("chkTypes");
if (chkStatus.Checked)
{
//getting the previous record form the gridview
dtRow = dtTable.NewRow();
//just to return to the first page of the gridview
dtTable.Rows.Add(dtRow);
dtRow[0] = grRow.Cells[1].Text;
dtRow[1] = grRow.Cells[2].Text;
// RememberCheckedValues();
RepopulateCheckBox();
_taggingAccountsManager.InsertAXPerDepartment(dtTable);
}
}