New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

Start in Edit Mode

HOW TO

Start RadDatForm in edit mode, without showing the ItemTemplate.

SOLUTION

Use its PreRender event to do one of the following:

  • Call the FireCommandEvent("Edit", "") method of the first item.
  • OR, set the Edit property of the first item to true and rebind the data form.

Make sure you have at least an emty ItemTemplate and that the control has a data source set.

C#
protected void RadDataForm1_PreRender(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        // first approach
        RadDataFormItem item = RadDataForm1.Items[0];
        item.FireCommandEvent("Edit", "");
        // second approach
        //(RadDataForm1.Items[0] as RadDataFormDataItem).Edit = true;
        //CandidateDataForm.Rebind();
    }
}
In this article
HOW TOSOLUTION
Not finding the help you need?
Contact Support