DataGridViewExtensionsToListView Method
Converts the source DataGridView to a ListView.
Namespace: DevCase.Extensions.DataGridViewExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static ListView ToListView(
this DataGridView sender
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function ToListView (
sender As DataGridView
) As ListView
Dim sender As DataGridView
Dim returnValue As ListView
returnValue = sender.ToListView()
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static ListView^ ToListView(
DataGridView^ sender
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member ToListView :
sender : DataGridView -> ListView
No code example is currently available or this language may not be supported.
- sender DataGridView
-
The source DataGridView.
ListView
The resulting
ListView.
In Visual Basic and C#, you can call this method as an instance method on any object of type
DataGridView. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
This is a code example.
No code example is currently available or this language may not be supported.
Dim dgv As New DataGridView
With dgv
.Columns.Add(columnName:="Column1", headerText:="Column1")
.Columns.Add(columnName:="Column2", headerText:="Column2")
.Columns.Add(columnName:="Column3", headerText:="Column3")
.Rows.Add({"Cell A1", "Cell A2", "Cell A3"})
.Rows.Add({"Cell B1", "Cell B2", "Cell B3"})
.Rows.Add({"Cell C1", "Cell C2", "Cell C3"})
End With
Dim lv As ListView = dgv.ToListView()
lv.View = View.Details
lv.Dock = DockStyle.Fill
Me.Controls.Add(lv)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.