Hello,
I have a bound datagrid called dgjobs that is bound
to a dataset called dsjobs using the following code.

Me.dgJobs.DataSource = dsJobs.Tables!Jobs
cm = CType(Me.BindingContext(dsJobs.Tables!jobs),
CurrencyManager)

The grid populates just fine however when the
currentcellchanged event is triggered (i.e. when you
scroll or click another row) I wish to get the value of the
first column (jobkey) in the currently selected row so
that I may use this as a parameter for a procedure. Any
ideas how I can read the data from the grid.

Thanx in advance

Robert Batt

Re: Getting data from a datagrid by Ken

Ken
Thu Sep 25 10:46:22 CDT 2003

Hi,

Try something like this.
Me.Text = DataGrid1(DataGrid1.CurrentRowIndex,0).ToString

Ken

---------------

"Robert Batt" <Robertxxxx@yahoo.com> wrote in message
news:1b6e01c3834a$85760a30$a401280a@phx.gbl...
> Hello,
> I have a bound datagrid called dgjobs that is bound
> to a dataset called dsjobs using the following code.
>
> Me.dgJobs.DataSource = dsJobs.Tables!Jobs
> cm = CType(Me.BindingContext(dsJobs.Tables!jobs),
> CurrencyManager)
>
> The grid populates just fine however when the
> currentcellchanged event is triggered (i.e. when you
> scroll or click another row) I wish to get the value of the
> first column (jobkey) in the currently selected row so
> that I may use this as a parameter for a procedure. Any
> ideas how I can read the data from the grid.
>
> Thanx in advance
>
> Robert Batt