简体   繁体   English

如何制作网格以在特定视觉状态下添加行? (UWP)

[英]how to make a grid to add rows in a certain visual state? (UWP)

I want to have a Grid that automatically adds rows or columns if a visual state was triggered. 我希望有一个网格,如果触发了可视状态,该网格会自动添加行或列。 I have tried everything that I know and nothing is working! 我已经尝试了所有我知道的东西,但没有任何效果!

Did you tried something like that: 您是否尝试过类似的方法:

DataGridViewRow row = (DataGridViewRow)yourDataGridView.Rows[0].Clone();
row.Cells["Column2"].Value = "XYZ";
row.Cells["Column6"].Value = 50.2;
yourDataGridView.Rows.Add(row);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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