Single vertical column of tiles

4 posts, 0 answers
  1. dhlennon
    dhlennon avatar
    32 posts
    Member since:
    Oct 2006

    Posted 14 Jun 2013 Link to this post

    Is it possible, in this first version, to have a single vertical column of tiles? 

    E.g.  I would like 5 'tiles' stacked vertically in a 1x5 grid layout.

    I cannot find a way to stop the tiles being added horizontally.

    The documentation states :
    "Tiles are ordered in columns, where each subsequent tile from the control declaration is placed below the previous one."  but this does not seem to be the case, each subsequent tile is placed to the right of the previous one.

    I know this is the v1.0 of this control, but I'm confused.

  2. dhlennon
    dhlennon avatar
    32 posts
    Member since:
    Oct 2006

    Posted 14 Jun 2013 Link to this post

    the only interim solution I have found is to have a different RadTileList object for each item, with TileRows=1.  It works. Is there a better way?
  3. DevCraft R3 2016 release webinar banner
  4. Phil
    Phil avatar
    84 posts
    Member since:
    Apr 2005

    Posted 14 Jun 2013 Link to this post

    If your tiles are wide, this is simples. Make TileRows a large number, e.g. 999, and you get a single column of tiles (provided you don't have an even larger number of tiles, in which case you need help!)
  5. Marin Bratanov
    Marin Bratanov avatar
    3555 posts

    Posted 17 Jun 2013 Link to this post

    Hi guys,

    You can count the tiles on the server and set the appropriate Height and TileRows properties of the control, e.g.:
    protected void Page_Load(object sender, EventArgs e)
        int tilesCount = RadTileList1.GetAllTiles().Count;
        int height = tilesCount  * 160; //a tile is 150px tall and we add some for the padding between them
        RadTileList1.Height = height;
        RadTileList1.TileRows = tilesCount; //TileRows defauilts to 3

    The tiles are ordered in columns, but as once the TileRows limit is reached a new row is created.

    Another point of interest is that this will work with Wide tiles only, the concept of the control is that each column is as wide as the Wide tile, so two Square tiles will fit there every time. Thus, a single column layout is possible only with Wide tiles. If Square tiles are used the height and the tileRows should be divided by 2 and there will be two columns always.

    Marin Bratanov
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top