PC Review


Reply
Thread Tools Rate Thread

how detect selected line in datagrid

 
 
Rafael Metring
Guest
Posts: n/a
 
      26th Feb 2004
How can i detect the selected line in datagrid and how to send the selected
value to other form ?

I need know whats cliente cod was selected to display complet information in
other form..

Tanks



 
Reply With Quote
 
 
 
 
Felipe T.
Guest
Posts: n/a
 
      26th Feb 2004
Hyo Rafael,
I use this way:

If grd.IsSelected(grd.CurrentRowIndex) Then
mCliCod = CType(grd.Item(grd.CurrentRowIndex, 0), Short)
Endif

So, with .CurrentRowIndex u can get the line selected,
the .IsSelected is for error handling when no item is selected.

well, u cand send information to ur form using Constructor parameters,
Shared variables,
or many other forms, i guess.

Cya,
Felipe T.

"Rafael Metring" <(E-Mail Removed)> wrote in message
news:e63di0G$(E-Mail Removed)...
> How can i detect the selected line in datagrid and how to send the

selected
> value to other form ?
>
> I need know whats cliente cod was selected to display complet information

in
> other form..
>
> Tanks
>
>
>



 
Reply With Quote
 
William Ryan eMVP
Guest
Posts: n/a
 
      26th Feb 2004
Like Felipe mentions, you can check CurrentCell or you can use .HitTest
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemwindowsformsdatagridhittesttypeclasstopic.asp
"Rafael Metring" <(E-Mail Removed)> wrote in message
news:e63di0G$(E-Mail Removed)...
> How can i detect the selected line in datagrid and how to send the

selected
> value to other form ?
>
> I need know whats cliente cod was selected to display complet information

in
> other form..
>
> Tanks
>
>
>



 
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 detect which row is selected? JsJ_Slim Microsoft Powerpoint 3 23rd Apr 2008 09:51 AM
how can vba detect what is currently selected? Tim Marsh Microsoft Excel Programming 2 5th Jul 2006 12:18 PM
detect row selected in datagrid Rod Microsoft Dot NET Framework Forms 0 17th Jun 2005 10:40 AM
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 01:39 AM.