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

namespace DetailsView_Columns
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
          
            this.radListView1.ViewType = Telerik.WinControls.UI.ListViewType.DetailsView;
            
        }
        void radListView1_ColumnCreating(object sender, Telerik.WinControls.UI.ListViewColumnCreatingEventArgs e)
        {
            if (e.Column.FieldName == "CustomerID" || e.Column.FieldName == "ParentID")
            {
                e.Column.Width = 100;
            }
            if (e.Column.FieldName == "CompanyName")
            {
                e.Column.Width = 80;
            }
            if (e.Column.FieldName == "ContactName")
            {
                e.Column.Width = 60;
            }
            else
            {
                e.Column.Width = 70;
            }
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'nwindDataSet.Customers' table. You can move, or remove it, as needed.
            this.customersTableAdapter.Fill(this.nwindDataSet.Customers);

        }
    }
}
