I am trying to change the input type of a textbox column in code
Dim col = New DataGridViewTextBoxColumn With {
.Name = team.Abbreviation,
.ToolTipText = team.Name,
.Tag = team.ID,
.InputType.Type = TextBoxType.Number,
.Width = 50}
But it errors out stating type is not a member of DataGridViewTextBoxColumn?
The compiler error says that you need an object reference to refer to Type. https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/cs0120
Use col.InputType.Type = .TextBoxType.Number
Wisej is a .NET library, doesn’t change the standard VB.NET or C# syntax and compilers.
Please login first to submit.