私はカスタムのDataGridViewColumnとDataGridViewCellを作成しようとしており、thisの記事が素晴らしいリソースであることがわかりました。 DataGridViewColumnクラスとDataGridViewCellクラスの作成が完了しましたが、列のタイプを編集しようとすると、新しいカスタムクラスがオプションの1つとして表示されません。私のDataGridViewScheduleColumnはDataGridViewColumnを継承しているので、私が間違っていることはあまりよく分かりません。これらのクラスをIDEに公開するために必要なことはありますか?Visual BasicのカスタムDataGridView列?
ありがとうございました。ここで
カスタム列クラス
Public Class DataGridViewScheduleColumn
Inherits DataGridViewColumn
Public Sub New()
Me.CellTemplate = New DataGridViewScheduleCell
Me.ReadOnly = True
End Sub
Public MaxValue As Long
Private needsRecalc As Boolean = True
Public Sub calcMaxValue()
If needsRecalc Then
Dim colIndex As Integer = Me.DisplayIndex
For rowIndex As Integer = 0 To Me.DataGridView.Rows.Count - 1
Dim row As DataGridViewRow = Me.DataGridView.Rows(rowIndex)
MaxValue = Math.Max(MaxValue, CLng(row.Cells(colIndex).Value))
Next
needsRecalc = False
End If
End Sub
エンドクラス
彼らは同じプロジェクトに参加していますが、なぜ私はそれらを見ることができないのか分かりません。 –