Hi, All.
I need to update Listview with dates in a month when user click a button. I have DateTimepicker and a button. Problem is how to fill each row with date.
Here is the code that i have done so far:
Thanks and regards.
I need to update Listview with dates in a month when user click a button. I have DateTimepicker and a button. Problem is how to fill each row with date.
Here is the code that i have done so far:
VB.NET:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim l As New ListViewItem
Dim numdays As Integer
numdays = DateTime.DaysInMonth(DateTimePicker1.Value.Year, DateTimePicker1.Value.Month)
ListView1.Items.Clear() '
For i As Integer = 1 To numdays
l = ListView1.Items.Add(i)
' here is what i need
Next
End Sub
Thanks and regards.
Last edited: