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

DataGridThe .net compact framework (I'm using v3.5) is a bit limited. I am trying to display an bool-value with application-specific texts, such as on / off or true / false translations. I created a class DataGridBoolColumnthat inherits from DataGridTextBoxColumn, and there I override the method Paint. But I have problems with returning the current value of the cell, since there is no GetColumnValueAtRowmethod in the comapct infrastructure.

In my small application, I know that the grid is bound to DataView, and I can pass the appropriate objects to my constructor so that I can see the value. But this is not the usual general way, so I cannot use this class in other applications with other related data sources. Is there a β€œfaster” way to get the current value in a method Paint?

+3
source share
1 answer

I hope this answer helps someone

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

Source: https://habr.com/ru/post/1759327/


All Articles