Click here to Skip to main content
11,570,759 members (58,048 online)
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 3

Thanks everyone very much.........I've solved my problem
  Permalink  
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 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


Advertise | Privacy | Mobile
Web03 | 2.8.150624.2 | Last Updated 10 Apr 2013
Copyright © CodeProject, 1999-2015
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