Datagrid Column value

M

Mark Bath

OK, there's probably a really easy answer (bit of code) that does this but
my brains fizzled and I'm struggling to get it.
Q:
I've populated a DataGrid with a dataview from a datatable from a dataset.
I don't want to use data binding, so how do I get the value of a column
(called "qty") when the user clicks on the grid?

-M.
 
I

Ilya Tumanov [MS]

object valueOfQtyColumnInCurrentRow = grid[grid.CurrentRowIndex,
QTY_COLUMN_INDEX];

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
 
M

Mark Bath

Cheers. New it was something simple.

-M.

"Ilya Tumanov [MS]" said:
object valueOfQtyColumnInCurrentRow = grid[grid.CurrentRowIndex,
QTY_COLUMN_INDEX];

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Reply-To: "Mark Bath" <[email protected]>
From: "Mark Bath" <[email protected]>
Subject: Datagrid Column value
Date: Wed, 15 Dec 2004 10:27:17 -0000
Lines: 10
Organization: EDS
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.compactframework
NNTP-Posting-Host: gatekeeper2.thorntons.co.uk 193.130.63.218
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15
phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.compactframework:66959
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

OK, there's probably a really easy answer (bit of code) that does this but
my brains fizzled and I'm struggling to get it.
Q:
I've populated a DataGrid with a dataview from a datatable from a dataset.
I don't want to use data binding, so how do I get the value of a column
(called "qty") when the user clicks on the grid?

-M.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top