[ 4 posts ]

cyril poirier

  • Username: cyril1a
  • Joined: Tue May 15, 2012 5:24 am
  • Posts: 2
  • Offline
  • Profile

Is it possible to have an inversed row / column model

Post Posted: Tue May 15, 2012 5:37 am
+0-
Hi all,

For a specific needs, I would like to know if there is a out of the box way to inverse the datatable representation : row <-> column ?
In other world to have the static header as a column and to have row added based on my datasource.

Or do i have to cheat with my datasource?

Many thanks
Cyril

Satyam

YUI Contributor

  • Username: Satyam
  • Joined: Tue Dec 09, 2008 12:34 am
  • Posts: 2016
  • Location: Sitges, Spain
  • GitHub: Satyam
  • Gists: Satyam
  • IRC: DevaSatyam
  • YUI Developer
  • Offline
  • Profile

Re: Is it possible to have an inversed row / column model

Post Posted: Tue May 15, 2012 6:55 am
+0-
DataTable has no provisions to change the orientation from top-to-bottom to left-to-right. Underneath it uses a regular HTML table which is equally unable to do such trick. You can trick it by providing the data crosswise, but then few features of the DataTable would actually work so, what would be the point of using DataTable at all?! At that point you might just as well use an HTML table.

cyril poirier

  • Username: cyril1a
  • Joined: Tue May 15, 2012 5:24 am
  • Posts: 2
  • Offline
  • Profile

Re: Is it possible to have an inversed row / column model

Post Posted: Tue May 15, 2012 7:34 am
+0-
Using a datatable i was expecting the row selection + hightlight available.
I ll study the opportunity to use a HTML table.
Thanks.

Satyam

YUI Contributor

  • Username: Satyam
  • Joined: Tue Dec 09, 2008 12:34 am
  • Posts: 2016
  • Location: Sitges, Spain
  • GitHub: Satyam
  • Gists: Satyam
  • IRC: DevaSatyam
  • YUI Developer
  • Offline
  • Profile

Re: Is it possible to have an inversed row / column model

Post Posted: Tue May 15, 2012 8:20 am
+0-
It would be easier for you to handle it yourself with a regular HTML table than trying to figure out how to trick DataTable to do it. Not that it would be easy, HTML tables are also row-oriented, but at least you would be working with something you know instead of learning the innards of DataTable just to start to figure out how to do it.
  [ 4 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum