开发者

How to implement databinding for windows custom control?

开发者 https://www.devze.com 2023-01-09 06:07 出处:网络
Basically, I am confused about how to implement databinding on the control side. I am trying to write a custom list control in C#, which implements databinding.I want it to end up having similar func

Basically, I am confused about how to implement databinding on the control side.

I am trying to write a custom list control in C#, which implements databinding. I want it to end up having similar functionality to the ListView, but with an interface similar to ListBox.

I have a private nested class 开发者_C百科called "ListRow" which handles rendering of each row. There is an internal binding source which gets changes from the data and causes the control to invalidate if necessary. The problem now is that I want to add a checkbox to the ListRow, and I am not sure the best way to implement it so that the underlying object's property gets changed.


try to follow this example. http://www.codeproject.com/KB/database/DataBindCustomControls.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消