PDA

View Full Version : Data view: Loading it vertically first then horizontally



anilcs0405
11 Nov 2009, 5:03 AM
I have some typical requirement where I need to load a Data View vertically and then horizontally, rather than filling it up horizontally. The sample also shows a similar result of showing horizontally.

suppose say I want to load items 1, 2, 3, 4, 5, 6, 7, 8

The data view displays it as
1 2 3 4
5 6 7 8

I want that as
1 3 5 7
2 4 6 8

I think I am clear.
Though it is simple to manipulate it's store and do that, I don't think that is going to scale.
Any idea how to do this?

Thanks in advance.

Condor
11 Nov 2009, 5:11 AM
Is the number of rows fixed?.

anilcs0405
11 Nov 2009, 5:13 AM
No I do not, but I know the number of columns and the total number of items of course from the store associated so I can calculate that. But after that how do I proceed?

anilcs0405
11 Nov 2009, 5:15 AM
I meant that the rows need not be fixed number, but as dynamic refresh is not a requirement it can be taken care form the column count and total number

Condor
11 Nov 2009, 6:04 AM
So the number of columns is fixed? In that case you'll have to create a rather complex tpl that calculates the number of rows and surrounds each set of rows with a column div.

jcabrera
11 Nov 2009, 6:23 AM
take odd first ant then even. is the less invasive method

Condor
11 Nov 2009, 6:33 AM
take odd first ant then even. is the less invasive method

That assumes that there are only 2 rows. I asked if there was a fixed number of rows and the answer was No.

jcabrera
11 Nov 2009, 7:03 AM
That assumes that there are only 2 rows. I asked if there was a fixed number of rows and the answer was No.

ok, and it only makes more complex the sort method