cross record binding in datagridview

mukesh2706

New member
Joined
Feb 19, 2008
Messages
2
Programming Experience
5-10
Hello,
I am making a project now in vb.net with sql server and it has a table like:

VB.NET:
[FONT="Courier New"]------------------------
Color    clarity    rate
------------------------
D         V1        780
D         VVS1     580
D         VVS2     950
F         V1         850
F         VVS1     1050
F         VVS2     1200
----------------------------[/FONT]
Record may be more... ( No limit)


but i want to bound a datagrid like that with table:

VB.NET:
[FONT="Courier New"]----------------------------------------
Color/Clarity     V1       VVS1       VVS2
----------------------------------------
D                   780      580         950
F                    850     1050       1200
------------------------------------------[/FONT]

So please help me any one.

Its Very Urgent for me...


Thanks
To All
 
Um.. SQLServer might be able to do the crosstab for you (PIVOT query) but remember that typically DataGridView is a view of data that can be edited. By its very nature, crosstabulated data cannot (it is grouped and summed) so you WOULDNT expect a DGV to crosstabulate. To crosstab data I would use a Crystal Reports crosstab.. If you hav ethe full version of Visual Studio, Crystal will be available to you
 
thanks for reply.

But i need it with datagridview only bcoz i want to make a updatable cell for rate column as per requirement.

Thanks
 
Just incase you missed what I wrote before:

Um.. SQLServer might be able to do the crosstab for you (PIVOT query) but remember that typically DataGridView is a view of data that can be edited. By its very nature, crosstabulated data cannot [be edited](it is grouped and summed) so you WOULDNT expect a DGV to crosstabulate. To crosstab data I would use a Crystal Reports crosstab.. If you hav ethe full version of Visual Studio, Crystal will be available to you
 
Back
Top