PC Review


Reply
Thread Tools Rate Thread

Datagrid Column value

 
 
Mark Bath
Guest
Posts: n/a
 
      15th Dec 2004
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.


 
Reply With Quote
 
 
 
 
Ilya Tumanov [MS]
Guest
Posts: n/a
 
      15th Dec 2004
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" <(E-Mail Removed)>
> From: "Mark Bath" <(E-Mail Removed)>
> 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: <#(E-Mail Removed)>
> 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.
>
>
>


 
Reply With Quote
 
Mark Bath
Guest
Posts: n/a
 
      16th Dec 2004
Cheers. New it was something simple.

-M.

""Ilya Tumanov [MS]"" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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" <(E-Mail Removed)>
> > From: "Mark Bath" <(E-Mail Removed)>
> > 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: <#(E-Mail Removed)>
> > 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.
> >
> >
> >

>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bind a dropdown in a column in a datagrid based on the dropdown value selected in another column of the datagrid. vishnu Microsoft ASP .NET 1 25th Mar 2006 01:24 PM
Re: Datagrid: how cut short display of a long description in a datagrid column Brian K. Williams Microsoft ASP .NET 0 2nd Mar 2004 08:35 PM
RE: Datagrid: how cut short display of a long description in a datagrid column =?Utf-8?B?U3VyZXNo?= Microsoft ASP .NET 0 2nd Mar 2004 08:31 PM
Need Help Determining DataGrid Column Selected for Sort using IBindingList - Datagrid.zip (0/1) David Elliott Microsoft Dot NET Framework Forms 1 18th Jul 2003 02:22 AM
Need Help Determining DataGrid Column Selected for Sort using IBindingList - Datagrid.zip (0/1) David Elliott Microsoft Dot NET Framework Forms 0 18th Jul 2003 02:12 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:58 AM.