views:

31

answers:

1

i have a gridview whose values are binded in

Day period1 period2 period3

Monday maths nill english

in this format

i have binded in a gridview that shows three records as

Day period1 period2 period3

Monday maths nill english

Monday maths nill english

Monday maths nill english


but how to bind these values in a gridview since monday will have 3 records / values..

how to bind the periodwise subjects and timings inside gridview. how to get these records binded oly once in a row

A: 

Hey,

You will either need to do:

  • A pivot operation in the database to get it in the format you need.
  • Code to take the three values and convert them to columns (you can programmably create a DataTable object to store the data, then loop through the records and create your flattened UI).

HTH.

Brian