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 _Default : System.Web.UI.Page
{
    protected override void OnInit(EventArgs e)
    {
         base.OnInit(e);
         RadGrid1.ItemCreated += new GridItemEventHandler(RadGrid1_ItemCreated);
    }

    protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridEditableItem && e.Item.IsInEditMode)
        {
            GridEditableItem item = e.Item as GridEditableItem;
            RequiredFieldValidator validator = new RequiredFieldValidator();
            validator.ControlToValidate = ((RadDatePicker)item["HireDate"].Controls[0]).ID;
            validator.ErrorMessage = "Please, choose a date!";

            item["HireDate"].Controls.Add(validator);
            
            
        }
    }


  

}
