DataGridList with orientation "horizontal"

So, it seems there was never a HorizontalGridDelegate made.

I needed a layout that laid it out in a grid, in columns, and would continue horizontally with no vertical scroll.

So i did a quick copy/paste of the VerticalGridDelegate and changed a few functions.

And then i tried to use it by setting orientation: "horizontal" on my DataGridList.
It kept defaulting to vertical.

Root cause was it was checking this.orientation in the constructor function, where user supplied properties aren't added until it gets to enyo.Object.

So I changed constructor to create, and then it worked.

I have hosted my code on github:

I will be refining the delegate as i continue with this project and get some of the sizing kinks worked out. I dunno about a pull request right now due to the differences between 2.5 and 2.6

But the contructor vs create is probably a bug that should be fixed


  • edited October 2015
    Good catch on the constructor()/create() thing. We were never able to find a use case for the horizontal grid layout but we'll change that so you can have your own.
Sign In or Register to comment.