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 System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.Data.OleDb;
using Telerik.Web.UI;

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

    }
    public DataTable GetData(string query)
    {
        string mdbPath = Server.MapPath("App_Data/Nwind.mdb");
        OleDbConnection dbCon = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + mdbPath);
        dbCon.Open();
        OleDbDataAdapter adapter = new OleDbDataAdapter(query, dbCon);
        DataTable dt = new DataTable();
        adapter.Fill(dt);
        dbCon.Close();

        return dt;
    }

    protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        RadGrid1.DataSource = GetData("SELECT top 10 [OrderID], [ProductID], [UnitPrice], [Quantity], [Discount] FROM [Order Details]");
    }
}
