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.ItemUpdated += new GridUpdatedEventHandler(RadGrid1_ItemUpdated);
        RadGrid1.ItemDataBound += new GridItemEventHandler(RadGrid1_ItemDataBound);
    }

    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {

            if (((GridDataItem)e.Item).GetDataKeyValue("ProductID").ToString() == dataKey)
            {
                e.Item.Selected = true;

            }
        }
    }


    private string dataKey;
    protected void RadGrid1_ItemUpdated(object sender, GridUpdatedEventArgs e)
    {
        dataKey = e.Item.GetDataKeyValue("ProductID").ToString();
    }


}
