Foreach loop?

Discussion in 'Programming' started by diyaots, Jul 19, 2012.

  1. #1
    [FONT=Verdana, Arial, Helvetica, sans-serif]
    Hello

    i have foreach condition.it repeats three times and bind it to the listview.
    but it show only last value.
    [/FONT]
    So please help me that is should show all the values of list view. with the help of example.

    Thanks
    Deepika
     
    diyaots, Jul 19, 2012 IP
  2. BRUm

    BRUm Well-Known Member

    Messages:
    3,086
    Likes Received:
    61
    Best Answers:
    1
    Trophy Points:
    100
    #2
    It would help if you pasted your code here.

    What language are to referring to? We need more information to help you!

    Since you're talking about listview I assume you're using either Javascript or C#?
     
    BRUm, Jul 21, 2012 IP
  3. Ralph23

    Ralph23 Peon

    Messages:
    493
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yes, as BRUm said, we need a lot more information, at least the language + a general idea of what you're trying to accomplish, we don't know what you mean by "show the values of the list" - show how?
     
    Ralph23, Jul 21, 2012 IP
  4. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #4
    I would GUESS you are assigning it to your 'listview' (whatever the *** that is) instead of ADDING it to it... then you'd just be overwriting the same value three times, resulting in the last one being the only one present.

    But yeah, without knowing what programming language, seeing the actual code, and a reasonable sample of the data set, you're asking to have a turbodiesel engine repaired through a keyhole.
     
    deathshadow, Jul 21, 2012 IP