using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Telerik.Web.UI;
using System.Web.UI.HtmlControls;
using System.Data.OleDb;

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



    protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
    {
        OleDbConnection MyOleDbConnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + Server.MapPath("~/App_Data/Nwind.mdb"));
        OleDbDataAdapter MyOleDbDataAdapter = new OleDbDataAdapter();
        MyOleDbDataAdapter.SelectCommand = new OleDbCommand("SELECT * FROM Customers", MyOleDbConnection);
        DataTable myDataTable = new DataTable("gridDataSource");
        MyOleDbConnection.Open();
        try
        {
            MyOleDbDataAdapter.Fill(myDataTable);
        }
        finally
        {
            MyOleDbConnection.Close();
        }

        RadGrid1.DataSource = myDataTable;

    }
}
