Current column from derived style.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a class that derives from DataGridTextBoxColumn like:

Public Class DataGridEditTextBoxColumn
Inherits DataGridTextBoxColumn

In this class I override Edit

Protected Overloads Overrides Sub Edit(ByVal source As
CurrencyManager, ByVal rowNum As Integer, ByVal bounds As Rectangle, ByVal
[readOnly] As Boolean, ByVal instantText As String, ByVal cellIsVisible As
Boolean)
MyBase.Edit(source, rowNum, bounds, False, instantText,
cellIsVisible)
Dim _col As Integer
End Sub

From the passed arguments how do I tell which column is being edited?

Thank you.

Kevin
 
Well, the MappingName should tell you which column it is. Or you use the
DataGridTableStyle property and loop it's GridColumnStyles collection until
you find yourself.

What do you need it for?

/claes
 
I will see if I can use that information. Thank you for the suggestion. I
need to know the column number so I know which column has been changed. I
know the row number by overriding the Edit method and it is passed in. I just
need to know the column number as well.

Thanks again.

Kevin

Claes Bergefall said:
Well, the MappingName should tell you which column it is. Or you use the
DataGridTableStyle property and loop it's GridColumnStyles collection until
you find yourself.

What do you need it for?

/claes

Kevin Burton said:
I have a class that derives from DataGridTextBoxColumn like:

Public Class DataGridEditTextBoxColumn
Inherits DataGridTextBoxColumn

In this class I override Edit

Protected Overloads Overrides Sub Edit(ByVal source As
CurrencyManager, ByVal rowNum As Integer, ByVal bounds As Rectangle, ByVal
[readOnly] As Boolean, ByVal instantText As String, ByVal cellIsVisible As
Boolean)
MyBase.Edit(source, rowNum, bounds, False, instantText,
cellIsVisible)
Dim _col As Integer
End Sub

From the passed arguments how do I tell which column is being edited?

Thank you.

Kevin
 
Back
Top