本文介绍了禁用checkedlistboxcontrol devexpress中的特定项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在devexpress中创建一个checkedlistbox并绑定数据。

启用特定项但生成错误。就像对象引用未设置为对象的实例一样。



我尝试过:



Dim control As CheckedListBoxControl = TryCast(发送者, CheckedListBoxControl)



Dim isActive As Boolean = CBool​​((TryCast((TryCast(control.DataSource,BindingSource))(e.Index),DataRowView))(Is_Active ))



如果isActive然后

e.Enabled = False

结束如果

I want to make a checkedlistbox in devexpress and bind the data.
when Enable the specific items but generate the error .like as Object reference not set to an instance of an object.

What I have tried:

Dim control As CheckedListBoxControl = TryCast(sender, CheckedListBoxControl)

Dim isActive As Boolean = CBool((TryCast((TryCast(control.DataSource, BindingSource))(e.Index), DataRowView))("Is_Active"))

If isActive Then
e.Enabled = False
End If

推荐答案


这篇关于禁用checkedlistboxcontrol devexpress中的特定项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 07:17