title: ASP.Net Display Images in a GridView span across columns and rows? Using C#
body: <p>I have some thumbnails I want to display in a Gridview. I am not familiar with all the customization that is offered. Basically I want to store the images in a Gridview, maybe spanning 5 columns wide...and then however many rows it takes to complete the rest. I don't want any column or row titles, and really don't want to see evidence of the actual grid. I also want to make the images clickable. </p>
  
  <p>I will be pulling the images from an Sql database in Asp.net. I do not want to bind the grid to an sqldatasource, but rather stick the images in the grid with some sort of loop in the code behind the page. This is where it gets confusing to me. I know you can create a datatable and add columns and rows. However, it seems like the rows/columns do not span. How would you store the images so that it worked like a grid. I provided some (very)sudo code below to give you an idea of what I am trying to do.</p>
  
  <p>sudo code:</p>
  
  <pre><code>colcount = 0;  
  rowcount = 0;  
  imagecount = 0;  
  while(images.length &gt; imagecount){  
      if(colcount &lt; 5){  
          grid[rowcount][colcount] = images[imagecount];  
          colcount++;  
          imagecount++;  
      }  
      else{  
          rowcount++;
          colcount = 0; 
      }
  }  
  </code></pre>