You have to change you datasource. Girdview does not provide such functionality by default. so the query which returns you the data has to do the job. you have to use PIVIOT which will convert your Rows into Columns. for details please visit the link mentioned below
http://msdn.microsoft.com/en-us/library/ms177410(v=sql.105).aspx[
^]
for your idea you can examine the sample code
select
*
from
(
select
PS.Name, P.Color, PIn.Quantity
from Production.Product P
inner join Production.ProductSubcategory PS
on PS.ProductSubcategoryID = P.ProductSubcategoryID
left join Production.ProductInventory PIn
on P.ProductID = PIn.ProductID
) DataTable
PIVOT
(
SUM(Quantity)
FOR Color
IN (
[Black],[Blue],[Grey],[Multi],[Red],
[Silver],[Silver/Black],[White],[Yellow]
)
) PivotTable