1

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

3
  • I love the artist's rendering of a SPGridView. :) Commented Oct 11, 2011 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? Commented Oct 11, 2011 at 14:39
  • no conditional grouping needed . column 2 contains 3 rows and inside each row there is need of 4-5 row. Commented Oct 12, 2011 at 4:58

2 Answers 2

0

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.

1
  • the sp list is datasource and i m using data table .any link would be appreciated Commented Oct 12, 2011 at 4:59
0

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 : http://www.c-sharpcorner.com/UploadFile/a577f3/5120/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.