This is a migrated thread and some comments may be shown as answers.

Problems setting TileGrid width from code-behind

4 Answers 71 Views
TileList
This is a migrated thread and some comments may be shown as answers.
Marcus
Top achievements
Rank 1
Marcus asked on 24 Jan 2014, 01:58 AM

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.

4 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 27 Jan 2014, 02:20 PM
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.
0
Marcus
Top achievements
Rank 1
answered on 28 Jan 2014, 11:07 PM
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
0
Accepted
Marin Bratanov
Telerik team
answered on 29 Jan 2014, 02:42 PM
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.
0
Marcus
Top achievements
Rank 1
answered on 31 Jan 2014, 06:34 PM
Hi Marin,
that worked - thx again for your help!

Rgds - Marcus.
Tags
TileList
Asked by
Marcus
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Marcus
Top achievements
Rank 1
Share this question
or