Suppose if You wants to change RadDatePicker Min date which is inside insert Item
So before the form OPens You can change this value On RadGrid Item Command
protected void RadGrid3_ItemCommand(object sender, GridCommandEventArgs e)
{
if (e.CommandName == RadGrid.InitInsertCommandName)
{
e.Canceled = true;
System.Collections.Specialized.ListDictionary newValues = new System.Collections.Specialized.ListDictionary();
e.Item.OwnerTableView.InsertItem(newValues);
string selected = RadYear.SelectedItem.Text;
GridEditableItem insertItem = e.Item.OwnerTableView.GetInsertItem();
RadDatePicker dtt = (RadDatePicker)insertItem.FindControl("RadDatePicker3") as RadDatePicker;
dtt.MinDate = Convert.ToDateTime(selected + "-01-01");
dtt.MaxDate = Convert.ToDateTime(selected + "-12-31");
}
}
Good One Very HelpFull
ReplyDelete