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;

public partial class Default2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }
    protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        RadGrid1.DataSource = new object[] { "a", "b", "c", "d" };
    }
    protected void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
        if (e.Item is GridEditableItem && e.Item.IsInEditMode)
        {
            GridEditableItem item = e.Item as GridEditableItem;
            GridTextBoxColumnEditor editor = (GridTextBoxColumnEditor)item.EditManager.GetColumnEditor("Item");
            TableCell cell = (TableCell)editor.TextBoxControl.Parent;

            RegularExpressionValidator validator = new RegularExpressionValidator();
            editor.TextBoxControl.ID = "ID_for_validation";
            validator.ControlToValidate = editor.TextBoxControl.ID;
            validator.ErrorMessage = "*";
            validator.ValidationExpression = @"\d{3,}";
            cell.Controls.Add(validator);
        }
    }  


}