using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;
using System.IO;
using System.Collections.Generic;
using System.Globalization;
using Telerik.Web.UI.GridExcelBuilder;
using System.Text.RegularExpressions;
using System.Data.SqlClient;
using System.Configuration;

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

    RadGrid RadGrid4 = new RadGrid();



    protected void Page_Load(object sender, EventArgs e)
    {

        // Grid4_PageLoad();

    }



    protected void Page_Init(object sender, System.EventArgs e)
    {

        Grid4_PageInit();

    }

    private void Grid4_PageInit()
    {

        RadGrid4.ID = "RadGrid4";

        RadGrid4.DataSource = SqlDataSource1;


        RadGrid4.Skin = "Office2010Blue";

        //   RadGrid4.Width = Unit.Percentage(100);

        RadGrid4.AllowPaging = true;

        RadGrid4.AutoGenerateColumns = false;

        RadGrid4.GroupingEnabled = false;

        RadGrid4.ShowGroupPanel = false;

        RadGrid4.ShowStatusBar = true;

        RadGrid4.AllowMultiRowSelection = true;

        RadGrid4.AutoGenerateColumns = false;


        RadGrid4.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;

        RadGrid4.PagerStyle.AlwaysVisible = true;


        RadGrid4.ClientSettings.AllowDragToGroup = true;

        RadGrid4.ClientSettings.Selecting.AllowRowSelect = true;

        RadGrid4.ClientSettings.AllowColumnsReorder = true;

        RadGrid4.ClientSettings.EnableRowHoverStyle = true;


        RadGrid4.ClientSettings.Scrolling.AllowScroll = true;

        RadGrid4.ClientSettings.Scrolling.UseStaticHeaders = true;

        RadGrid4.ClientSettings.Scrolling.ScrollHeight = Unit.Percentage(100);


        RadGrid4.ClientSettings.Resizing.AllowColumnResize = true;

        RadGrid4.ClientSettings.Resizing.EnableRealTimeResize = true;

        RadGrid4.ClientSettings.Resizing.ResizeGridOnColumnResize = true;

        RadGrid4.ClientSettings.Resizing.AllowResizeToFit = true;


        RadGrid4.MasterTableView.PageSize = 50;

        RadGrid4.MasterTableView.AllowSorting = true;

        RadGrid4.MasterTableView.AllowMultiColumnSorting = true;

        RadGrid4.MasterTableView.TableLayout = GridTableLayout.Fixed;

        GridClientSelectColumn selectColumn;

        selectColumn = new GridClientSelectColumn();

        selectColumn.UniqueName = "ClientSelectColumn";

        selectColumn.HeaderStyle.Width = Unit.Pixel(35);

        selectColumn.Resizable = false;

        RadGrid4.MasterTableView.Columns.Add(selectColumn);


        GridBoundColumn boundColumn;

        boundColumn = new GridBoundColumn();

        RadGrid4.MasterTableView.Columns.Add(boundColumn);

        boundColumn.DataField = "ProductID";

        boundColumn.HeaderText = "Taak";

        boundColumn.HeaderStyle.Width = Unit.Pixel(100);

        boundColumn.ItemStyle.Wrap = false;


        boundColumn = new GridBoundColumn();

        RadGrid4.MasterTableView.Columns.Add(boundColumn);

        boundColumn.DataField = "ProductName";

        boundColumn.HeaderText = "Gebied";

        boundColumn.HeaderStyle.Width = Unit.Pixel(100);

        boundColumn.ItemStyle.Wrap = false;


        boundColumn = new GridBoundColumn();

        RadGrid4.MasterTableView.Columns.Add(boundColumn);

        boundColumn.DataField = "QuantityPerUnit";

        boundColumn.HeaderText = "Aantal";

        boundColumn.HeaderStyle.Width = Unit.Pixel(100);

        boundColumn.ItemStyle.Wrap = false;


        boundColumn = new GridBoundColumn();

        RadGrid4.MasterTableView.Columns.Add(boundColumn);

        boundColumn.DataField = "UnitPrice";

        boundColumn.HeaderText = "Start";

     //   boundColumn.HeaderStyle.Width = Unit.Pixel(100);

        boundColumn.ItemStyle.Wrap = false;


        this.PlaceHolderGrid4.Controls.Add(RadGrid4);

    }



}