adding items to a Listview

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Angelina

    #1

    adding items to a Listview

    Hi,

    I wanted to add a few items to my listview control. The
    values of these will be obtained from other controls on
    my interface. When the user clicks the select button,
    they will need to be added to my listview. This is what i
    need help doing.
    I have added the columns to the listview but i now want
    to add the values that correspond to these columns so
    that they all appear in a single row.

    Here is my column heading and an example of how i want
    the values to appear

    Room Name Booking Date Meal Type Quantity
    delux 1/1/2003 Chinese 3
    Indian 2
    Thai 4


    the meal types can vary between each booking so i will
    need a way of making sure they are all get inserted into
    the 3 and 4th column.

    Ca anyone give me some help on how to go about doing
    this?? Is there a way to refernce a specific column in my
    listview so i can add the values accordingly?

    thxx in adavnce
  • Sylvain Provencher

    #2
    Re: adding items to a Listview

    With a listview, you have in fact just one item, who is the first column.

    If you choose detail view, you can see other columns, who are of type
    ListViewSubItem

    Note: if the change the text property of a listview subitem, the display
    will not refresh automatically. You must assign the subitem to himself to
    refresh the cell

    "Angelina" <anonymous@disc ussions.microso ft.com> wrote in message
    news:0c9601c3b2 bd$0041c820$a00 1280a@phx.gbl.. .[color=blue]
    > Hi,
    >
    > I wanted to add a few items to my listview control. The
    > values of these will be obtained from other controls on
    > my interface. When the user clicks the select button,
    > they will need to be added to my listview. This is what i
    > need help doing.
    > I have added the columns to the listview but i now want
    > to add the values that correspond to these columns so
    > that they all appear in a single row.
    >
    > Here is my column heading and an example of how i want
    > the values to appear
    >
    > Room Name Booking Date Meal Type Quantity
    > delux 1/1/2003 Chinese 3
    > Indian 2
    > Thai 4
    >
    >
    > the meal types can vary between each booking so i will
    > need a way of making sure they are all get inserted into
    > the 3 and 4th column.
    >
    > Ca anyone give me some help on how to go about doing
    > this?? Is there a way to refernce a specific column in my
    > listview so i can add the values accordingly?
    >
    > thxx in adavnce[/color]


    Comment

    Working...