Dear experts
i want to ask three question about the listView control
1)how i can add a columns header to the listview control (i added the columns to the listview but this columns header did not appear to the listview)
2)how i can bind a list of object to the listview control for example
Dim lstObj As New List(Of HoliDayData)
this list of objects return from database , i want to ask how i can put this list of object in the listView control
and appear like the DataGrid . (Rows and columns ---- note that each object in the list lstObj represent a row in the database and will appear as a row in the listview )
--------------------------
----------
----------
----------
-------
HoliDayName StratDate EndDate >>>>> columns Headers
--------------------------
----------
----------
----------
--------
ABC 1/1/2007 3/1/2007 >>>>> row
DEF 3/5/2007 7/3/2007 >>>>>row
GHI 6/7/2007 7/7/2007 >>>>>row
--------------------------
----------
----------
----------
--------
3) i want to ask how i can do this scenario ,
there are a one texbox represent a holiday name and two DateTimePicker represent the start and end date of the holiday
i want when i click by mouse on a one row in the listview control take the value of the (holiday name , holiday start date , holiday end date ) for this row and fill this values in
the textbox and two DateTimePicker , in other words bind the listview with this controls .
Start Free Trial