Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个数据列表。Label 和 Grid 在 DataList 的 ItemTemplate 内,我已经绑定了 Grid noe 我想在 Label 中显示 Total Of Grid Column。放置在 Grid 的父控件中
您可以使用以下代码计算 giridview 列:
int colCount = GridView1.Items[0].Cells.Count;