Hello,
I have a gridview control bound to a objectdatasourc e.
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(obje ct sender,
GridViewEditEve ntArgs 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
--
Life in the sun
I have a gridview control bound to a objectdatasourc e.
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(obje ct sender,
GridViewEditEve ntArgs 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
--
Life in the sun
Comment