简体   繁体   中英

Insert BoundField into DetailsView

Basically I have a detailsview, dependent on what query it is I have certain BoundFields I'd like to show or hide.

Using visual basic, I know that I can use .visible = false. That does the trick, however, it sacrifices my alternating row style in the process.

Any ideas?

Thanks

By the way if you write it in C# I will probably understand.

What you need to do is create several asp:panel objects. Inside each panel object, put a single DetailsView. In your codebehind, you will want to show the panel that contains the proper DetailsView for your query, and hide the rest of the panels.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM