M
Mike Cooper
I have been staring at the above error for over a week now! I have a
an inherited data class looking like thus:
Public Class DataGridBoolColumnInherit
Inherits System.Windows.Forms.DataGridBoolColumn
Protected Overloads Overrides Sub Paint(ByVal g As Graphics, ByVal
bounds As Rectangle, ByVal [source] As CurrencyManager, ByVal rowNum
As Integer, ByVal backBrush As Brush, ByVal foreBrush As Brush, ByVal
alignToRight As Boolean)
---------------------
Then in my Main() I have the following relevent code:
Friend WithEvents DataGridBoolColumnInherit1 As
DataGridBoolColumnInherit
Me.DataGridBoolColumnInherit1 = New DataGridBoolColumnInherit()
Public Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim dgt As DataGridTableStyle = Main_DataGrid.TableStyles(0)
Dim cm As CurrencyManager = CType(Me.BindingContext _
(Main_DataSet.Tables(dgt.MappingName)), CurrencyManager)
Dim cellRect As Rectangle
Dim cellrow As Integer = 5
Dim cellcolumn As Integer = 1
cellRect = Main_DataGrid.GetCellBounds(3, 0)
hehe = dgt.GridColumnStyles(0)
Dim gridCol As MyGridColumn
Dim graph As Graphics = Main_DataGrid.CreateGraphics()
Dim fBrush As New SolidBrush(Color.Yellow)
Dim bBrush As New SolidBrush(Color.Yellow)
DataGridBoolColumnInherit1.Paint(graph, cellRect, cm, cellrow,
bBrush,
fbrush, False)
For some reason the program does not "see" the Paint method inherited
from datagridboolcolumn. This problem has "simple answer" written all
over it. But I don't see it! Can anyone else? Please?
Mike Cooper
an inherited data class looking like thus:
Public Class DataGridBoolColumnInherit
Inherits System.Windows.Forms.DataGridBoolColumn
Protected Overloads Overrides Sub Paint(ByVal g As Graphics, ByVal
bounds As Rectangle, ByVal [source] As CurrencyManager, ByVal rowNum
As Integer, ByVal backBrush As Brush, ByVal foreBrush As Brush, ByVal
alignToRight As Boolean)
---------------------
Then in my Main() I have the following relevent code:
Friend WithEvents DataGridBoolColumnInherit1 As
DataGridBoolColumnInherit
Me.DataGridBoolColumnInherit1 = New DataGridBoolColumnInherit()
Public Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim dgt As DataGridTableStyle = Main_DataGrid.TableStyles(0)
Dim cm As CurrencyManager = CType(Me.BindingContext _
(Main_DataSet.Tables(dgt.MappingName)), CurrencyManager)
Dim cellRect As Rectangle
Dim cellrow As Integer = 5
Dim cellcolumn As Integer = 1
cellRect = Main_DataGrid.GetCellBounds(3, 0)
hehe = dgt.GridColumnStyles(0)
Dim gridCol As MyGridColumn
Dim graph As Graphics = Main_DataGrid.CreateGraphics()
Dim fBrush As New SolidBrush(Color.Yellow)
Dim bBrush As New SolidBrush(Color.Yellow)
DataGridBoolColumnInherit1.Paint(graph, cellRect, cm, cellrow,
bBrush,
fbrush, False)
For some reason the program does not "see" the Paint method inherited
from datagridboolcolumn. This problem has "simple answer" written all
over it. But I don't see it! Can anyone else? Please?
Mike Cooper