ASP.NET Datagrid with VB

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

I've got a datagrid on an asp.net page that loads 4 columns of data from a
SQL query. One of the columns is hidden which contains the identity column
that i use for the primary key.

On the grid, i have an edit command set so that when the button is pressed,
it'll reroute the user to another page that will display ALL data related to
that specific primary key in another grid. The problem I'm having is I
can't seem to pull the primary key out of the specific row that the user
clicked the view button for.

I'd greatly appreciate any help with this
 
Hello Chris,
On the grid, i have an edit command set so that when the button is
pressed, it'll reroute the user to another page that will display ALL
data related to that specific primary key in another grid. The
problem I'm having is I can't seem to pull the primary key out of the
specific row that the user clicked the view button for.

Have you tried e.Item.DataItem? You should be able to cast this to the appropriate object (DataRow or a custom business object).
 
Worked wonderfully ... Thanks a lot Matt

Matt Berther said:
Hello Chris,


Have you tried e.Item.DataItem? You should be able to cast this to the
appropriate object (DataRow or a custom business object).
 
Back
Top