---
title: "How i can show Two tables record in GridView"  
description: "How i can show Two tables record in GridView"  
author: "Niraj Kumar Mishra"  
published: 2017-08-23  
updated: 2017-08-23  
canonical: https://www.mindstick.com/forum/34330/how-i-can-show-two-tables-record-in-gridview  
category: "c#"  
tags: ["c#", "ado.net"]  
reading_time: 1 minute  

---

# How i can show Two tables record in GridView

Hi..i have [faced](https://www.mindstick.com/forum/23284/c-sharp-problem-faced) a [problem](https://yourviews.mindstick.com/view/81399/tackling-the-problem-of-unemployment-during-corona-pandemic) in our c# [window](https://www.mindstick.com/forum/161285/how-does-the-window-console-object-work-in-javascript) [application](https://www.mindstick.com/articles/12824/calculator-application-in-android) .I have two [table](https://www.mindstick.com/articles/43918/how-to-design-table-using-bootstrap) [Employee](https://www.mindstick.com/articles/85431/remote-employee-training-tips-tricks) and Department and i want to show both [tables](https://www.mindstick.com/articles/336597/introduction-of-html-tables-for-web-development) all [data](https://www.mindstick.com/articles/13050/salesforce-aiming-to-dominate-predictive-analytics-with-data-science) in a [Gridview](https://www.mindstick.com/articles/873/update-delete-edit-gridview-in-asp-dot-net).**my [Query](https://www.mindstick.com/blog/202/sub-query-in-sqlserver) is:**

```
SqlConnection con = new SqlConnection(ConnectionString);       String query = "select * from Employee, Department";       SqlCommand cmd = new SqlCommand(query,con);       SqlDataReader dr;       con.Open();       dr = cmd.ExecuteReader();       GridView1.DataSource = dr;       GridView1.DataBind();      con.Close();
```

\
but it show only first table record in Gridview .please help...


---

Original Source: https://www.mindstick.com/forum/34330/how-i-can-show-two-tables-record-in-gridview

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
