Loading ...

How to display records in a gridview in matrix format?

Who is online?  0 guests and 0 members
home  »  forums   »  asp.net topics   »  client side web development   » How to display records in a gridview in matrix format?

How to display records in a gridview in matrix format?

Posts under the topic: How to display records in a gridview in matrix format?

Posted: 6/27/2011

Lurker 245  points  Lurker
  • Joined on: 4/15/2011
  • Posts: 44

I want to display records in a gridview in matrix format How?

Please somebody help me....

I have the following table structure

tbl_user

User_idUser_namePasswordfirst_nameLast_nameUser_image
1pallavippp 

Posted: 6/27/2011

Starter 727  points  Starter
  • Joined on: 6/6/2011
  • Posts: 74

pallavi karpe said:

I want to display records in a gridview in matrix format How?

Please somebody help me....

I have the following table structure

tbl_user

User_idUser_namePasswordfirst_nameLast_nameUser_image
1pallavippp 

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 


tags SQL PIVOT

Posted: 6/27/2011

Guru 16773  points  Guru
  • Joined on: 4/19/2009
  • Posts: 490

pallavi karpe said:

I have the following table structure


Can you let us know the output you needed?


Posted: 6/27/2011

Professional 8505  points  Professional
  • Joined on: 5/3/2010
  • Posts: 391

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 structure

tbl_user

User_idUser_namePasswordfirst_nameLast_nameUser_image
1pallavippp 

 

 

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 

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

Lurker 245  points  Lurker
  • Joined on: 4/15/2011
  • Posts: 44

Hi Hajan,

sorry I don't want to copy but

I want final output somthing like codeasp.net's People page

regards,

Pallavi


Posted: 6/28/2011

Guru 16773  points  Guru
  • Joined on: 4/19/2009
  • Posts: 490
  Answered

The matrix is just because of the design, it is a simple ul li.


Posted: 6/28/2011

Professional 8505  points  Professional
  • Joined on: 5/3/2010
  • Posts: 391
  Answered

pallavi karpe said:

Hi Hajan,

sorry I don't want to copy but

I want final output somthing like codeasp.net's People page

regards,

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


Page 1 of 1 (7 items)