PC Review


Reply
Thread Tools Rate Thread

current row key in data grid

 
 
Brian Henry
Guest
Posts: n/a
 
      23rd Nov 2004
is there a simple way to get the currently selected row's key in a bound
data grid in winforms? thanks


 
Reply With Quote
 
 
 
 
Doug Bell
Guest
Posts: n/a
 
      23rd Nov 2004
Brian,
Is this what you want?
Dim intMyRow As Integer

Dim cellItm As DataGridCell

Dim MyKey As Integer

cellItm = MyGrid.CurrentCell

intRow = cellItm.RowNumber

MyKey = MyGrid(intRow, 1).ToString

Doug

"Brian Henry" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> is there a simple way to get the currently selected row's key in a bound
> data grid in winforms? thanks
>
>



 
Reply With Quote
 
Brian Henry
Guest
Posts: n/a
 
      23rd Nov 2004
thanks!

"Doug Bell" <dug@bigpond> wrote in message
news:(E-Mail Removed)...
> Brian,
> Is this what you want?
> Dim intMyRow As Integer
>
> Dim cellItm As DataGridCell
>
> Dim MyKey As Integer
>
> cellItm = MyGrid.CurrentCell
>
> intRow = cellItm.RowNumber
>
> MyKey = MyGrid(intRow, 1).ToString
>
> Doug
>
> "Brian Henry" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> is there a simple way to get the currently selected row's key in a bound
>> data grid in winforms? thanks
>>
>>

>
>



 
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
How to Add the Data grid and How to load the Grid? =?Utf-8?B?S2FydGhpa2V5YW4gUGVyaWFzYW15?= Microsoft Access Form Coding 3 2nd Jul 2007 03:02 PM
Grid View / Data Grid =?Utf-8?B?TWFyY28=?= Microsoft Access Forms 4 3rd May 2007 06:03 PM
Data grid with current page combo box selector Brian Henry Microsoft ASP .NET 1 22nd Jul 2004 12:13 PM
Data grid current page number? Brian Henry Microsoft ASP .NET 7 16th Jul 2004 01:47 PM
Re: Need syntax to Display Current Year in query grid, Thanks Dave Cheryl Fischer Microsoft Access Forms 0 31st Aug 2003 05:16 PM


Features
 

Advertising
 

Newsgroups
 


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