Click here to Skip to main content
12,626,517 members (35,575 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C#3.0 C#
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
Updated 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 :D
  Permalink  
Comments
CuongPuyol 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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.161205.3 | Last Updated 10 Apr 2013
Copyright © CodeProject, 1999-2016
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