Search code examples
.netc#-4.0telerik-grid

RadGrid FormTemplate: Don't want to view edit mode on page load


Basically, I am using FormTemplate for my grid which works perfectly but When I always load my page, I always see the first row in edit mode. How I can change the mode to view mode? I mean: when I first load the page, all rows to be shown in tabular format and anytime I click on edit button, the formTemplate controls to be shown.

Hope I delivered my question comprehensively.


Solution

  • The problem is resolved: I removed below method and it did the trick.

    protected void gridActivities_PreRender(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            gridActivities.EditIndexes.Add(0);
            gridActivities.Rebind();
        }
    }