---
title: "Introduction to Dataset XSD file"  
description: "In this article, I am going to discuss how a Dataset XSD file can be used to bind a GridControl. XSD file can be created by Add New Item-> Dataset fil"  
author: "mohan kumar"  
published: 2012-04-24  
updated: 2019-09-07  
canonical: https://www.mindstick.com/articles/929/introduction-to-dataset-xsd-file  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# Introduction to Dataset XSD file

In this [article](https://yourviews.mindstick.com/view/81489/kashmir-now-after-an-year-of-abrogation-of-article-370), I am going to discuss how a [Dataset](https://www.mindstick.com/articles/19/dataset) [XSD](https://www.mindstick.com/blog/575/convert-data-table-to-xml-xsd-and-html) [file](https://www.mindstick.com/articles/59/encrypting-and-decrypting-files-using-c-sharp) can be used to bind a **GridControl. XSD** file can be created by **[Add](https://www.mindstick.com/forum/34174/how-add-icon-to-the-project-asp-dot-net-mvc-with-bootstrap) New [Item](https://www.mindstick.com/forum/156564/remove-item-in-an-array-in-javascript)-> Dataset** file and give a suitable [name](https://answers.mindstick.com/qa/38468/name-the-bollywood-actor-who-has-been-named-by-the-indian-olympic-association-as-the-country-s-goodwill-ambassador-representing-the-indian-contingent-at-the-2016-rio-olympics) and [put](https://answers.mindstick.com/qa/37572/should-schools-put-tracking-devices-in-students-id-cards) it under **App_Code** folder.\

##### MyData.xsd File:-

![Introduction to Dataset XSD file](https://www.mindstick.com/mindstickarticle/d3da64de-5283-4120-a334-5ee6342dfc20/images/d9ab5695-8837-4b91-96dc-0fc55d00d3ff.png)

##### Default.aspx Code:

```
<asp:GridView ID="myGrid" runat="server" CellPadding="4" ForeColor="#333333"            GridLines="None">            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />            <EditRowStyle BackColor="#999999" />            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />        </asp:GridView> 
```

Default.aspx.cs Code:

\

```
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Data.SqlClient;using System.Data; public partial class _Default : System.Web.UI.Page{    SqlConnection conn = new SqlConnection("Data Source=CHNVEL2BLM06;Initial Catalog=master;Integrated Security=true");      protected void Page_Load(object sender, EventArgs e)    {        loadMyGrid();           }     public void loadMyGrid()    {        MyDataTableAdapters.EmployeeTableAdapter adapter=new MyDataTableAdapters.EmployeeTableAdapter();        MyData.EmployeeDataTable table = adapter.GetData();        myGrid.DataSource = table;        myGrid.DataBind();    }}
```

\

\

I hope this article will help you.

\

---

Original Source: https://www.mindstick.com/articles/929/introduction-to-dataset-xsd-file

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
