using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.CodeDom;

using System.Web.Services;
using Telerik.Web.UI;
using System.Data;
using System.Web.Configuration;
using System.Data.SqlClient;

partial class _Default : System.Web.UI.Page
{

    protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
    {
        string connectionString = WebConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
        SqlConnection conn = new SqlConnection(connectionString);
        SqlCommand command = new SqlCommand("Select * from [Customers]", conn);
        DataTable table = new DataTable();
        
        using (conn)
        {
            conn.Open();
            SqlDataReader reader = command.ExecuteReader();
            table.Load(reader);
        }
        RadGrid1.DataSource = table;
    }
}








