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.
我已经完成了复选框的制作,因为我在 Visual Studio 中将布尔变量作为网格视图自动在网格视图中显示复选框。它是 vs2012 中的更新,但是 vs2010。你已经手动创建它。但我想显示颜色按钮而不是复选框。
您需要使用如下RowDataBound事件gridview
RowDataBound
gridview
protected void RowDataBound(Object sender, GridViewRowEventArgs e) { if(e.Row.RowType == DataControlRowType.DataRow) { //check for a particular value // change the color of button after finding button in the row } }