title: How to Add Image In List View in C#?
body: <p>I have windows application where data comes via json I have parsed the data and able to show in listview.</p>
  
  <p>Now i want to add image to with in. I have tried lot oh things but this is not working.
  As per my need.</p>
  
  <p>Please guide how i will show this data in list box.</p>
  
  <p>I am using this code.</p>
  
  <pre><code>listView1.Columns.Add("brand", 100, HorizontalAlignment.Left);
  listView1.Columns.Add("rating", 100, HorizontalAlignment.Left);
  listView1.Columns.Add("max_price", 100, HorizontalAlignment.Left);
  listView1.SmallImageList = imageList1;
  
  foreach (var item in lstItemDetails)
  {
      ListViewItem objListViewItem = new ListViewItem(item.image_medium);
      objListViewItem.SubItems.Add(item.brand);
  
      objListViewItem.SubItems.Add(item.rating);
      objListViewItem.SubItems.Add(item.max_price);
  
      if (!string.IsNullOrEmpty(item.rating))
      {
          int rating = int.Parse(item.rating);
          objListViewItem.ImageIndex = rating;
      }
      else
      {
          objListViewItem.ImageIndex = 0;
      }
  
       listView1.Items.Add(objListViewItem);
  }
  </code></pre>
  
  <p>This is showing only last assigned image in all place. start rating image as per item.rating count.</p>
  
  <p>Please suggest me the better way to solve this.</p>