Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#3.0 WinForm
Hi everyone,
 
I build a WinForm application, I have a form which includes: two datagridview and two table have relationship.
I show information from table 1 and then I want to click on row of datagridview 1 and show information of table 2.
To do it, I must use event of data grid view?
 
Many thanks.
Posted 26-Jan-13 6:45am
Edited 26-Jan-13 6:51am
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Thanks everyone, I had solved my problem Big Grin | :-D
  Permalink  
Comments
CuongPuyol at 10-Apr-13 6:23am
   
Thanks everyone very much.........I've solved my problem
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Dear CuongPuyol
 
i use also such type of code in my project i am placing example of my project events for you kindly check it if it is useful for you
        private void gridSrch_DoubleClick(object sender, EventArgs e)
        {
            cmbitem.Text = gridSrch.Rows[gridSrch.CurrentRow.Index].Cells[0].Value.ToString();
            panelSearch.Visible = false;
        }
 
        private void gridSrch_KeyDown(object sender, KeyEventArgs e)
        {
            cmbitem.Text = gridSrch.Rows[gridSrch.CurrentRow.Index].Cells[0].Value.ToString();
            panelSearch.Visible = false;
        }
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Thanks everyone very much.........I've solved my problem
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 625
1 OriginalGriff 285
2 George Jonsson 225
3 CPallini 210
4 Fredrik Bornander 150
0 OriginalGriff 5,835
1 Sergey Alexandrovich Kryukov 5,263
2 CPallini 4,750
3 George Jonsson 3,227
4 Gihan Liyanage 2,487


Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 10 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100