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.
我有一个数据网格,它绑定并给了我 12 行。我想隐藏第 7 行之后的所有行。
有什么建议么?
尝试这个:
if (e.Row.RowType == DataControlRowType.DataRow) { int index = e.Row.RowIndex; if(index>7) { dataGridView1.Rows(index ).Visible = False } }