开发者

Disable or hide row/column in detailsview when inserting?

When in insert mode detailsview, there are some pa开发者_开发知识库rameters that I would like to disable or hide. The columns are autogenerated.

Doesn't work:

DetailsView3.Rows(5).Visible = False

or

DetailsView3.Rows(5).Enabled = False

I'm lost.


X.X

Do it after you databind.


In C#:

protected void DetailsView2_DataBound(object sender, EventArgs e)
{
 if (DetailsView2.CurrentMode == DetailsViewMode.Insert)
 {
  DetailsView2.Rows[5].Visible = false;
 }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜