Label wrapping and RadAjaxPanel in VS Designer

4 posts, 0 answers
  1. Matthew
    Matthew avatar
    2 posts
    Member since:
    Mar 2011

    Posted 30 Oct 2011 Link to this post

    Hi,

    When I place an asp:Label inside of a RadAjaxPanel control, it no longer wraps the text when I set a width on the label. As soon as the label is dragged outside of the RadAjaxPanel on the VS design surface, it wraps nicely.

    This also happens when I place a label inside of a RadMultiPage/RadPageView (I haven't tested to see if any other controls do this yet).

    I'm currently evaluating this product and really need my labels to wrap as I'm creating a number of custom server controls and if they don't look right when my colleagues add them to the design surface, they will think I've done half a job and cause them all sorts of problems.

    A little further testing reveals this also happens with basic HTML elements such as SPAN and DIV if I set the width with CSS.

    Any help would be hugely appreciated.

    Thanks,
    Matt
  2. Radoslav
    Admin
    Radoslav avatar
    1566 posts

    Posted 02 Nov 2011 Link to this post

    Hello Matthew,

    I tried to reproduce the described issue but to no avail. I am sending you a simple example, please check it out and let me know what differs in your case.

    Looking forward for your reply.

    Best wishes,
    Radoslav
    the Telerik team
    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 their blog feed now
  3. Matthew
    Matthew avatar
    2 posts
    Member since:
    Mar 2011

    Posted 02 Nov 2011 Link to this post

    Hi Radoslav,

    Thank you so much for your reply and example source code.

    Your example works fine on my machine.

    On that basis, I started looking at the differences between what you sent and what I had.

    After ensuring my project was using the libraries that you were using, removing the designer dll from the GAC (referencing in the local BIN) and other more obvious things failed to fix it, I went back to first principles.

    The strangest thing seems to be the problem. If my RadAjaxPanel has an ID, I get the problem. If I remove the ID (as with your example), Labels wrap as they should.

    Removing the ID's isn't a problem per-say for the RadAjaxPanel in my project. Where it will start to become a problem for me is when using controls like the RadMultiView.

    This control was exhibiting the same behaviour and as with the RadAjaxPanel, removing the ID from each RadPageView fixes it. This  is something I am reluctant to do as I'm using methods like FindPageViewByID. I also like to give my controls an ID for good practice (as is also the norm when a control is dragged on to the design surface).

    Do you know if there is a way around this (either by setting something else or an alternative for FindPageViewByID) or is it, as I think it may be, a bug/feature with the Designer for some of the controls?

    Any help you can give would be fab.

    Thanks,
    Matt
  4. Radoslav
    Admin
    Radoslav avatar
    1566 posts

    Posted 07 Nov 2011 Link to this post

    Hello Matthew,

    Indeed the server controls should have IDs especially when you need to find some control and operate programmatically with it. However the described problem is  very strange. We have not encountered it so far and we are not sure what could be the reason for experiencing the problem. It will be helpful if you send us a small runnable example which demonstrates the described issue. You could open a formal support ticket from your Telerik account and attach a ZIP file there. Thus we will be able to gather more details about your scenario, debug the application and investigate the problem.

    Looking forward for your reply.

    Greetings,
    Radoslav
    the Telerik team
    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 their blog feed now
Back to Top