Quisiera agregar una columna que contenga un CheckBox
con la siguiente información:
- Seguro Asistencia
- Seguro Desgravamen
- Columna que contenga
CheckBox
Como la imagen:
Lo avanzando en código:
Private Sub Form3_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.ListView1.View = View.Details
Me.ListView1.GridLines = True
ListView1.HeaderStyle = ColumnHeaderStyle.Nonclickable
Dim columnHeader1 As New ColumnHeader
With columnHeader1
.Text = "Numero de Credito"
.TextAlign = HorizontalAlignment.Left
.Width = 146
End With
Dim columnHeader2 As New ColumnHeader
With columnHeader2
.Text = "Numero Cuota"
.TextAlign = HorizontalAlignment.Center
.Width = 142
End With
Dim columnHeader3 As New ColumnHeader
With columnHeader3
.Text = "Ultima Cuota"
.TextAlign = HorizontalAlignment.Center
.Width = 142
End With
conn = New SqlConnection("Data Source=SERVER;Initial Catalog=BASE_DATOS;User ID=USUARIO;Password=CONTRASENA")
Dim strQ As String = String.Empty
strQ = "select top 2 Descripcion from credito..Rubro WHERE IdRubro NOT IN (41,42,44,45,1056,1057,1058,48,43) "
cmd = New SqlCommand(strQ, conn)
da = New SqlDataAdapter(cmd)
ds = New DataSet
da.Fill(ds, "Rubros")
Dim i As Integer = 0
Dim j As Integer = 0
' adding the columns in ListView
For i = 0 To ds.Tables(0).Rows.Count - 1
'For j = 0 To ds.Tables(0).Columns.Count - 1
Dim LSet = Me.ListView1.Columns.Add(ds.Tables(0).Rows(i)(j).ToString())
LSet.Width = 218
Next
'Now adding the Items in Listview
For i = 0 To ds.Tables(0).Rows.Count - 1
For j = 0 To ds.Tables(0).Columns.Count - 1
itemcoll(j) = ds.Tables(0).Rows(i)(j).ToString()
Next
Dim lvi As New ListViewItem(itemcoll)
Me.ListView1.Items.Add(lvi)
Next
End Sub
información sensible
que muestras en el código de tu pregunta, en este caso de tu cadena de conexión.