using System;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using System.Collections.Generic;
using Telerik.Web.UI;
using System.Configuration;
using System.Data.SqlClient;
using System.Data;
using System.Web.UI;
using System.Globalization;
using System.Text;
using MySql.Data.MySqlClient;
using System.Collections;
using System.Linq;
using NorthwindOpenAccessModel;
using System.Web.Configuration;


public partial class EmpyPage : System.Web.UI.Page
{
	protected void Page_Load(object sender, EventArgs e)
	{

	}

	protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
	{
		LoadGrid1();
	}

	private void LoadGrid1()
	{
		string sql = "SELECT [CustomerID], [CompanyName], [ContactName], [ContactTitle] FROM [Customers]";
		SqlConnection connection = new SqlConnection(WebConfigurationManager.ConnectionStrings["NorthwindConnection"].ConnectionString);
		SqlDataAdapter dataAdapter = new SqlDataAdapter(sql, connection);
		DataTable dataTable = new DataTable();
		using (connection)
		{
			dataAdapter.Fill(dataTable);
		}
		RadGrid1.DataSource = dataTable;
	} 
}

