【发布时间】:2015-04-04 06:16:51
【问题描述】:
基本上,我将 FormTemplate 用于我的网格,它工作得很好,但是当我总是加载我的页面时,我总是在编辑模式下看到第一行。如何将模式更改为查看模式?我的意思是:当我第一次加载页面时,所有行都以表格格式显示,并且每当我单击编辑按钮时,都会显示 formTemplate 控件。
希望我能全面地提出我的问题。
【问题讨论】:
-
有关更多信息,我已将这种方法用于我的网格:Radgrid EditTemplate,但当我加载或刷新页面时,此方法默认显示编辑模式。
-
在该演示的代码隐藏中,他们有:
protected void RadGrid1_PreRender(object sender, System.EventArgs e) { if (!this.IsPostBack && this.RadGrid1.MasterTableView.Items.Count > 1) { this.RadGrid1.MasterTableView.Items[1].Edit = true; this.RadGrid1.MasterTableView.Rebind(); } }。除非您的代码中有类似的内容,否则编辑表单不应在页面加载时显示。
标签: .net c#-4.0 telerik-grid