M
McGivney
I want to place a value from a databound cell in a detailsview into a label.
The code below works on page load, but then on subsequent record changes it
returns the value of the cell before the detailsview changed. Old value, I
need value after the change.
What am I overlooking ?
Thanks in advance for your help,
Jim
(Originally posted to vsnet.general)
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DetailsViewRow row;
row = DetailsView1.Rows[0];
Label1.Text = row.Cells[1].Text;
//This works on page load
}
}
protected void DetailsView1_PageIndexChanged(object sender, EventArgs e)
{
DetailsViewRow row;
row = DetailsView1.Rows[0];
Label1.Text = row.Cells[1].Text;
// This gives value for old record before detailsview changed
}
The code below works on page load, but then on subsequent record changes it
returns the value of the cell before the detailsview changed. Old value, I
need value after the change.
What am I overlooking ?
Thanks in advance for your help,
Jim
(Originally posted to vsnet.general)
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DetailsViewRow row;
row = DetailsView1.Rows[0];
Label1.Text = row.Cells[1].Text;
//This works on page load
}
}
protected void DetailsView1_PageIndexChanged(object sender, EventArgs e)
{
DetailsViewRow row;
row = DetailsView1.Rows[0];
Label1.Text = row.Cells[1].Text;
// This gives value for old record before detailsview changed
}