I want to upgrade MSFlexGrid to .net datagridview, what is equivalent code for these code??
With gridview
If .Row > .FixedRows Then
bDoNotEdit = True
.Row = .Row - 1
bDoNotEdit = False
End If
If .Row < .Rows - 1 Then
bDoNotEdit = True
.Row = .Row + 1
bDoNotEdit = False
End If
End With
Using a data grid view.
The code segment assumes that you have created a datagridview control named "SubmittedDataGridView" and have created the columns in the IDE at design-time, or have specified them at run-time before you get here.
I do not know what the variable "bDoNotEdit" means or is used for, so I've ignored it.
'step one, create a datagridrow
Dim aRow As New System.Windows.Forms.DataGridViewRow
'Step two, create a prototypical Row from the datagridview control
aRow.CreateCells(SubmittedDataGridView)
'Step Three, specify the values
aRow.Cells(0).Value = "value one"
aRow.Cells(1).Value = "Value two"
aRow.Cells(2).Value = "value three"
'Append the row to the DataGridView
SubmittedDataGridView.Rows.Add(aRow)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With