New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Start in Insert Mode

HOW TO

Start RadDatForm in insert mode, without showing the ItemTemplate.

SOLUTION

Use its PreRender event to set its IsItemInserted property to true and rebind it.

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

protected void RadDataForm1_PreRender(object sender, EventArgs e)
{
    if (!Page.IsPostBack)
    {
        RadDataForm df = sender as RadDataForm;
        df.IsItemInserted = true;
        df.Rebind();
    }
}
Protected Sub RadDataForm1_PreRender(ByVal sender As Object, ByVal e As EventArgs)
    If Not Page.IsPostBack Then
        Dim df As RadDataForm = TryCast(sender, RadDataForm)
        df.IsItemInserted = True
        df.Rebind()
    End If
End Sub
In this article
Not finding the help you need? Improve this article