开发者

.Net compact framework: inherit from DataGridTextBoxColumn, GetColumnValueAtRow is missing

The DataG开发者_运维知识库rid in the .net compact framework (I'm using v3.5) is a bit limited. I try to display a bool-value with app-defined texts like "on/off" or translations of "true/false". I've created a class DataGridBoolColumn which inherits from DataGridTextBoxColumn and there I override the Paint-method. But I've problems with retrieving the current value of the cell, since there's no GetColumnValueAtRow-method in the comapct framework.

In my small app I know, that the grid is bound to a DataView and I can pass the relevant objects to my constructor so I can look up the value. But this is not a real generic way so I can't use this class in other apps with other bound data sources. Is there a "righter" way to get the current value in the Paint method?


I hope this answer helps someone

DirectCast(DirectCast(source.List(rowNum), System.Object), System.Data.DataRowView).Row(Me.MappingName, Data.DataRowVersion.Current)
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜