在ComboboxColumn的selectedIndexChanged事件上启用/禁用Datagridview的单元格 [英] Enable/Disable Cells of Datagridview On ComboboxColumn's selectedIndexChanged Event

查看:59
本文介绍了在ComboboxColumn的selectedIndexChanged事件上启用/禁用Datagridview的单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在C#Windows应用程序中有一个Datagridview
在其中,我有12个datagridview列中的一个ComboBoxColumn

现在我想根据条件禁用/启用ComboBoxColumns选择的索引跟踪事件上特定行的单元格.

不是Gridview的整个列都应该启用/禁用,我希望ComboxBox的特定选定行的单元格

如何在C#Windows应用程序中执行此操作

I have a Datagridview in C# windows Application
In it i have one ComboBoxColumn out of 12 datagridview columns

Now I want to disable/enable cells of particular row on ComboBoxColumns selected index chaged event according to Condition.

Not Gridview''s whole column should enable/disable, I want Cells of particular selected Row of ComboxBox

How can i do this in C# windows application

推荐答案

这不起作用吗?
Is this does not work?
dataGridView1.Rows[1].Cells[2].ReadOnly = true;


这篇关于在ComboboxColumn的selectedIndexChanged事件上启用/禁用Datagridview的单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆