Reputation: 480
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.
Upvotes: 1
Views: 188
Reputation: 480
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();
}
}
Upvotes: 1