Posted: 6/27/2011
I want to display records in a gridview in matrix format How?
Please somebody help me....
I have the following table structure
tbl_user
pallavi karpe said: I want to display records in a gridview in matrix format How?Please somebody help me....I have the following table structuretbl_userUser_idUser_namePasswordfirst_nameLast_nameUser_image1pallavippp
Hi Pallavi,
Try to use SQL PIVOT table using OPENXML Query, here is the tutorial and sample code:
http://www.codeproject.com/KB/aspnet/SQLPivotTable_OPENXML.aspx
Best Regards,
Gjorgji
pallavi karpe said: I have the following table structure
Gjorgji Dimitrov said: pallavi karpe said: I want to display records in a gridview in matrix format How?Please somebody help me....I have the following table structuretbl_userUser_idUser_namePasswordfirst_nameLast_nameUser_image1pallavippp Hi Pallavi,Try to use SQL PIVOT table using OPENXML Query, here is the tutorial and sample code:http://www.codeproject.com/KB/aspnet/SQLPivotTable_OPENXML.aspxBest Regards,Gjorgji
Emm... we are not yet sure for what SQL Server version he needs this since PIVOT is not supported AS IN the provided example in some older MS SQL versions. The solution using PIVOT seems perfect for such cases. However, sometimes using CASE and GROUP may fit better and can be easier to understand, so I would also like to know the same thing Raghav asked for.
Thanks,Hajan
Posted: 6/28/2011
Hi Hajan,
sorry I don't want to copy but
I want final output somthing like codeasp.net's People page
regards,
Pallavi
The matrix is just because of the design, it is a simple ul li.
pallavi karpe said: Hi Hajan,sorry I don't want to copy butI want final output somthing like codeasp.net's People pageregards,Pallavi
Ahh... then, you have overcomplicated this ;)...
As Raghav pointed out, the data on people page is ul li, one element is rendered int he following format:
<li><a href="#"> <img src="image" /> </a> <!-- details --> <ul> <li><a href="#">Name Surname</a></li> <li>Level (Points)</li> </ul> </li>
Of course, you can see it in the rendered HTML page which is open ;)!
Regards,Hajan