SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to develop a webpart which takes data from list and populate in spgridview. The webpart should look like in the image atached. I am able to display the column 1 i.e one image for each row but How do I create the column 2 , which have several rows to be displayed from the list?

enter image description here

share|improve this question
I love the artist's rendering of a SPGridView. :) – Kit Menke Oct 11 '11 at 14:05
Need some details.. The Column 2 contains how many rows? and those rows are from the same list? any conditions or grouping needed? – Shantha Kumar Thambidurai Oct 11 '11 at 14:39
no conditional grouping needed . column 2 contains 3 rows and inside each row there is need of 4-5 row. – Nikhil Jangle Oct 12 '11 at 4:58

I'm not sure what you are using as the DataSource for your SPGridView but lets assume a DataTable object.

I would just generate the HTML you need (list?) and update the rows in the DataTable.

Then, I would use a regular 'ole BoundField with HtmlEncode set to false so that the HTML displays in the SPGridView column.

share|improve this answer
the sp list is datasource and i m using data table .any link would be appreciated – Nikhil Jangle Oct 12 '11 at 4:59
up vote 0 down vote accepted

I was able to achieve this by Grid view template field property . Created a table with my required structure and attached it with template field

Check this link for other option which is helpful :

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.