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 7:45am
Edited 26-Jan-13 7:51am
v2
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  
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

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

  Print Answers RSS
0 OriginalGriff 275
1 DamithSL 265
2 CPallini 235
3 Maciej Los 185
4 George Jonsson 170
0 OriginalGriff 5,305
1 DamithSL 4,382
2 Maciej Los 3,760
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,901


Advertise | Privacy | Mobile
Web01 | 2.8.141216.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