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.
我有datagridview1,datagridview1.Rows.Insert(0, "name"); 现在我想要设置,datagridview1.value=name但显示文本=其他文本。
datagridview1.Rows.Insert(0, "name");
datagridview1.value=name
我想datagridview1显示例如 name22 而不是 name 但datagridview1值只识别 name 而不是 name22
datagridview1
很难理解你的问题,但我想你可以这样做:
foreach (DataGridViewRow grid1row in Datagridview1.Rows) { if(grid1row.Cells["field name"].Value.Equals("name")) { grid1row.Cells["field name"].value = other text; } }
你是这个意思吗?