开发者

Disable or hide row/column in detailsview when inserting?

开发者 https://www.devze.com 2023-01-11 04:12 出处:网络
When in insert mode detailsview, there are some pa开发者_开发知识库rameters that I would like to disable or hide. The columns are autogenerated.

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

精彩评论

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