[英]Changing the color and enable to edit the value in the selected Row for Datagrid in C#
I am retrieving a table from SQL database and save it into a dataset. 我正在从SQL数据库中检索表并将其保存到数据集中。
After that I displayed that dataset on the form with DATAGRID. 之后,我使用DATAGRID在表单上显示该数据集。
I can show that. 我可以证明这一点。
Here comes my problem. 这是我的问题。
I have a column in the dataset. 我在数据集中有一列。
Let's call it Status. 我们称之为状态。
If the status is open, I want to change the font of that row and allow User to edit that row. 如果状态为打开,则我想更改该行的字体并允许用户编辑该行。
If not, User cannot edit it. 如果不是,则用户无法对其进行编辑。
Anyone? 任何人?
I have been searching a lot. 我一直在搜索很多。 But none of them really helped me.
但是他们没有一个真正帮助我。
I am using DATAGRID. 我正在使用DATAGRID。 NOT a gridview.
不是gridview。
Thanks all. 谢谢大家
将数据模板与数据触发器一起使用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.