Click here to Skip to main content
15,898,538 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
There are two DataGridView (DtGView1 and DtGView2). Both datagridview are display values from sqlserver.

DtGView1
<br />
R_Id | Route | PickTime | DropTime<br />
1    | xyz   | 07:00    | 14:00<br />
3    | xyz   | 09:00    | 14:30<br />


DtGView2
<br />
R_Id | Route | PickTime | DropTime<br />
1    | xyz   |<br />
2    | xyz   | <br />
3    | xyz   | <br />
4    | xyz   | <br />


My question is, how could I get PickTime & DropTime in DtGView2only those which R_Id is available in DtGView1.

What I have tried:

......................................
Posted
Updated 9-Sep-16 0:37am
Comments
Karthik_Mahalingam 9-Sep-16 6:45am    
how you are fetching the values?
nityanand NCR 9-Sep-16 6:47am    
From SQL Server...
Karthik_Mahalingam 9-Sep-16 6:47am    
i mean the query, is there any link between 2 gridview
nityanand NCR 9-Sep-16 6:49am    
On button click....
Karthik_Mahalingam 9-Sep-16 6:57am    
that is fine,
i mean the data souce query for each gridview

1 solution

 
Share this answer
 
Comments
nityanand NCR 9-Sep-16 6:45am    
Sir I don't want copy. I want represent only intoDtGView1 those PickTime and DropTime values which R_Id represent in DtGView1.
The Praveen Singh 9-Sep-16 7:12am    
you mean common id data like 1 and 3 in a single datagrid.
nityanand NCR 9-Sep-16 23:14pm    
Absolutely....

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900