кликаю на ячейку, созданую по шаблону своего класса, начинаю вводить текст а он не вводиться... А мне нужно чтобы в водился, как в обычных ячейках.

- Код: Выделить всё
Public Class DataGridViewTaskStepCell
Inherits DataGridViewTextBoxCell
Dim brushPercent As Brush
Dim Bitmaps(0) As Bitmap
Dim IconValue As Integer = 0
Dim IconType As Integer = 0
Dim TaskColor As Color = Color.White
Public Sub New()
End Sub
Public Sub SetImageReference(ByRef ImgRef As Bitmap())
Bitmaps = ImgRef
End Sub
Public Sub SetIconType(ByVal _IconType As Integer)
IconType = _IconType
End Sub
Public Sub SetIconValue(ByVal _IconValue As Integer)
IconValue = _IconValue
End Sub
Public Sub SetTaskColor(ByVal _TaskColor As Color)
TaskColor = _TaskColor
End Sub
Public Overrides ReadOnly Property EditType() As System.Type
Get
Return Nothing
End Get
End Property
Protected Overrides Sub Paint(ByVal graphics As System.Drawing.Graphics, ByVal clipBounds As System.Drawing.Rectangle, ByVal cellBounds As System.Drawing.Rectangle, ByVal rowIndex As Integer, ByVal cellState As System.Windows.Forms.DataGridViewElementStates, ByVal value As Object, ByVal formattedValue As Object, ByVal errorText As String, ByVal cellStyle As System.Windows.Forms.DataGridViewCellStyle, ByVal advancedBorderStyle As System.Windows.Forms.DataGridViewAdvancedBorderStyle, ByVal paintParts As System.Windows.Forms.DataGridViewPaintParts)
graphics.FillRectangle(Brushes.White, cellBounds.X, cellBounds.Y, cellBounds.Width, cellBounds.Height)
Dim Brush As New SolidBrush(TaskColor)
graphics.FillRectangle(Brush, cellBounds.X + 2, cellBounds.Y + 2, cellBounds.Width - 5, cellBounds.Height - 3)
MyBase.Paint(graphics, clipBounds, cellBounds, rowIndex, cellState, value, formattedValue, errorText, cellStyle, advancedBorderStyle, DataGridViewPaintParts.ContentForeground)
If IconType >= 0 And IconType < Bitmaps.Length - 1 Then
Dim xp As Integer = cellBounds.X + 4
Dim yp As Integer = cellBounds.Y + 3
graphics.DrawImage(Bitmaps(IconType), xp, yp)
End If
Dim adr As Point = MyBase.DataGridView.CurrentCellAddress
If adr.X = ColumnIndex And adr.Y = rowIndex Then
'graphics.DrawRectangle(Pens.Black, New Rectangle(cellBounds.X, cellBounds.Y, cellBounds.Width - 1, cellBounds.Height - 1))
End If
End Sub
End Class