G
Guest
Hello,
I have a gridview control bound to a objectdatasource.
The primary key column is on the grid but made visible = false.
Because the column is invisible I cant get to the cell value when the user
presses
the edit button on the grid.
Code
protected void grdBedpDetails_RowEditing(object sender,
GridViewEditEventArgs e)
{
String bedpID = grdBedpDetails.Rows[e.NewEditIndex].Cells[1].Text;
}
I have set up the grdBedpDetails.DataKeyNames property
but this is only useful in the selectedindex event not the RowEditing event
grdBedpDetails.Rows[e.NewEditIndex].Cells[1].Text return a empty string
because the column is invisible.
Thanks
I have a gridview control bound to a objectdatasource.
The primary key column is on the grid but made visible = false.
Because the column is invisible I cant get to the cell value when the user
presses
the edit button on the grid.
Code
protected void grdBedpDetails_RowEditing(object sender,
GridViewEditEventArgs e)
{
String bedpID = grdBedpDetails.Rows[e.NewEditIndex].Cells[1].Text;
}
I have set up the grdBedpDetails.DataKeyNames property
but this is only useful in the selectedindex event not the RowEditing event
grdBedpDetails.Rows[e.NewEditIndex].Cells[1].Text return a empty string
because the column is invisible.
Thanks