开发者

How to change data binding from left to right in Asp.net table?

开发者 https://www.devze.com 2023-02-12 07:33 出处:网络
Normally Table data bind from top to bottom with column headers at the top of开发者_如何学Go the table.Is there way to change the data binding from left to right and headers in the first column of the

Normally Table data bind from top to bottom with column headers at the top of开发者_如何学Go the table.Is there way to change the data binding from left to right and headers in the first column of the table?

How to change data binding from left to right in Asp.net table?


You can't automatically' do this is asp.net. You need to transform/pivot your data into the form you need. This is also called a crosstab report.

There are a few options:

  1. DIY - Loop through the rows in your source data and manually transform it.

  2. Do the pivot in SQL Server. Here is a simple example on SO.

  3. Use a 3rd-party pivot table control to do the hard work for you. eg Devexpress has fantastic asp.net pivottable control. There are other out there too. Unfortunately they are not free.

0

精彩评论

暂无评论...
验证码 换一张
取 消