glad it worked!
<Steven C> wrote in message
news:(E-Mail Removed)...
> Coolness!
>
> Thanks for all your help. 
>
> Steven
>
> >On Wed, 5 May 2004 18:42:46 -0400, "William Ryan eMVP"
<(E-Mail Removed)> wrote:
>
> >Just cast it to whatever type the value of the PK is.
> ><Steven C> wrote in message
> >news:(E-Mail Removed)...
> >> Thanks, Bill
> >>
> >> This seems to return an object, while I need to return the actual PK
> >> value. For Instance, I have:
> >>
> >> int PK =
> >> CustomersTable.Rows[grdCustomers.CurrentRowIndex]["customerno"];
> >>
> >> But this throws an exception because it's trying to return an object,
> >> not the integer value for the PK.
> >>
> >> Steven
> >>
> >> >On Wed, 5 May 2004 16:44:24 -0400, "William Ryan eMVP"
> ><(E-Mail Removed)> wrote:
> >>
> >> >The datagrid has a CurrentCell property. CurrentCell is compose of a
row
> >> >and an index value. YOu can use those (assuming the sort order is the
> >same)
> >> >which will correspond the the row and column index of the table its
bound
> >> >to.
> >> >
> >> >So, if the PK Value was "Bill" and the PK was the first column in your
> >> >datatable.
> >> >
> >> >You could the reference
dataTable.Rows[DataGrid.CurrentRowIndex][PKName]
> >> ><Steven C> wrote in message
> >> >news:(E-Mail Removed)...
> >> >> Hello:
> >> >>
> >> >> I have a datagrid that has a dataset bound to it. When the customer
> >> >> selects a certain row in the grid, I would like to be able to grab
the
> >> >> PK for that row, so I can call the customer edit form and load the
> >> >> textboxes with a SELECT based upon that PK. How do I do this? In
> >> >> Foxpro, since cursors have global scope, I would just call the edit
> >> >> form and load the textboxes from the current (selected) record.
> >> >>
> >> >> Thanks!
> >> >>
> >> >> Steven
> >> >>
> >> >>
> >> >
> >>
> >
>