Problems setting TileGrid width from code-behind

5 posts, 1 answers
  1. Marcus
    Marcus avatar
    30 posts
    Member since:
    Feb 2009

    Posted 23 Jan 2014 Link to this post

    Hi there,

    I have a databound (scrolling disabled) tilegrid and am trying to set the width of the grid through code-behind. Setting RadTileList.width works, but there is a "div class='rtlistWrapper'" that appears to default to a value much lower than the width I'm setting. This causes the grid to render as a 'narrow column', rather than taking up the whole defined width. I'm assuming this is some computed value (developer tools show the value coming from Telerik.Webresource.axd), so the question is, how can I access this value from code behind?

    I guess I could override the css class client-side with js, but that seems kind of messy ...



    Short explanation, just to show what I'm trying to achieve: I'm creating a (reusable) user control, where the user can set the grid width, tile width and row number to make the grid fit into different page layouts - makes sense?



    Thx in advance for help and/or pointers!

    M.

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 27 Jan 2014 Link to this post

    Hi,

    Q1 2014 will bring responsive capabilities for the RadTileList control, so I advise that you wait a couple of weeks until it goes live and test it. Support for size set in percent will be introduced, and the control will automatically calculate the number of rows it can use.

    At present, the rtlistScrollWrapper element has its width calculated according to the number of tiles and the tile column width, which is 320px plus a little margins/paddings. Having other tile dimensions is not supported at the moment.

    On the rtlistWrapper class - this is an element that creates the separate columns of tiles and it is supposed to be 320px wide - this is the width of a wide tile plus some margins. The issue, however, is, that all your tiles end up in the same wrapper element, which should not be the case. I have just tried the wrapping elements are created accordingly. Can you confirm you are using the Q3 2013 SP1 version? Can you confirm you are following the guidance from the following resources:
    http://www.telerik.com/help/aspnet-ajax/tilelist-databinding-basics.html
    http://www.telerik.com/help/aspnet-ajax/tilelist-databinding-defining-structure.html
    http://demos.telerik.com/aspnet-ajax/tilelist/examples/databinding/defaultcs.aspx

    Also, are there JavaScript errors on the page? If there are, this is likely to break the control's functionality. Could you see if resolving them (if present) helps?

    If you share with me some code that leads to the problem, perhaps I will be able to help with the current version of the control. Without being able to examine the exact case, this would be much harder, however. You could replace databinding with a loop that will create tiles for each group in the code-behind.


    Regards,
    Marin Bratanov
    Telerik
    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 UI for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Marcus
    Marcus avatar
    30 posts
    Member since:
    Feb 2009

    Posted 28 Jan 2014 in reply to Marin Bratanov Link to this post

    Hi Marin,

    thx for your reply. That's good to know about the changes to the Q1.2014 release.

    Until then, I have implemented a workaround by putting standalone ImageandText tiles in a repeater control, but have hit another problem.
    I can set width and height of the tiles, but there is a "div class='rtileContent'" that appears to be hardcoded to a height of 150px, which causes the peektemplate to be visible at the bottom.

    How do I modify this value?

    Thx again!
    Marcus

    PS: using 2013.3.1114.40
  5. Answer
    Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 29 Jan 2014 Link to this post

    Hello Marcus,

    Does this happen with other animations than Slide? There is a known issues with this type of animation that was fixed in Q3 2013 SP2 that just went out yesterday: http://www.telerik.com/support/whats-new/aspnet-ajax/release-history/q3-2013-sp2.
    If you cannot upgrade to that version, a workaround can be changing the animation to Fade, for example.


    Regards,
    Marin Bratanov
    Telerik
    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 UI for ASP.NET AJAX, subscribe to the blog feed now.
  6. Marcus
    Marcus avatar
    30 posts
    Member since:
    Feb 2009

    Posted 31 Jan 2014 Link to this post

    Hi Marin,
    that worked - thx again for your help!

    Rgds - Marcus.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017