using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;
using System.Data.SqlClient;
using System.Data.OleDb;

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

    protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
    {
        if (e.CommandName == RadGrid.EditCommandName)
        {
            e.Item.OwnerTableView.EditFormSettings.CaptionDataField = "CompanyName";
            e.Item.OwnerTableView.EditFormSettings.CaptionFormatString = "Edit Details for {0} Here";
        }
        else if (e.CommandName == RadGrid.InitInsertCommandName)
        {
            //CaptionDataField cannot be set for an InsertForm since its a general form   
            e.Item.OwnerTableView.EditFormSettings.CaptionFormatString = "Insert Details Here";
            e.Item.OwnerTableView.Rebind();
        }  

    }
    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
        
    }
}


