using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace HierarchicalGridSample
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            radGridView1.AutoGenerateHierarchy = true;

            NORTHWNDDataSetTableAdapters.CategoriesTableAdapter catAdapter = new HierarchicalGridSample.NORTHWNDDataSetTableAdapters.CategoriesTableAdapter();
            catAdapter.Fill(nORTHWNDDataSet.Categories);
            NORTHWNDDataSetTableAdapters.ProductsTableAdapter prodAdapter = new HierarchicalGridSample.NORTHWNDDataSetTableAdapters.ProductsTableAdapter();
            prodAdapter.Fill(nORTHWNDDataSet.Products);

            radGridView1.DataSource = nORTHWNDDataSet;
            radGridView1.DataMember = "Categories";
        }
    }
}
