using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using System.Collections;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Init(object sender, EventArgs e)
    {
        RadGrid1.ItemCommand += new GridCommandEventHandler(RadGrid1_ItemCommand);
        RadGrid1.NeedDataSource += new GridNeedDataSourceEventHandler(RadGrid1_NeedDataSource);
        RadGrid1.ItemDataBound += new GridItemEventHandler(RadGrid1_ItemDataBound);
        RadGrid1.ItemCreated += new GridItemEventHandler(RadGrid1_ItemCreated);
        btnGetSelectedValues.Click += new EventHandler(btnGetSelectedValues_Click);
        
    }

    protected void btnGetSelectedValues_Click(object sender, EventArgs e)
    {
        Hashtable itemValues = new Hashtable();
        ((GridDataItem)RadGrid1.SelectedItems[0]).ExtractValues(itemValues);
        //now itemValues contains all the column values for the item selected except for those columns that are set to ReadOnly;
        //if you need the values of the ReadOnly columns, just set their ForceExtractValue property to true
    }

    protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridEditableItem && e.Item.IsInEditMode)
        {
            GridEditableItem item = e.Item as GridEditableItem;
            RadComboBox combo = item["Supplier"].FindControl("rcmbSuppliers") as RadComboBox;
            combo.DataSource = SqlDataSource3.Select(new DataSourceSelectArguments());
        }
    }

    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {

    }

    protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        
    }

    protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
    {

     }

 

}
