Textbox style bindings not working

2 posts, 1 answers
  1. Arun Kumar
    Arun Kumar avatar
    60 posts
    Member since:
    Nov 2009

    Posted 15 Dec 2010 Link to this post

    I want to display value of textbox like treeview in table report item. I am using one database field to set the left padding. But it does not work. If I use html preview it shows as expected but not in normal preview / silverlight application.

    This is what i am doing:

    public static Telerik.Reporting.Drawing.Unit GetLeftPadding(double lvl)
                if (lvl <= 1)
                    return Telerik.Reporting.Drawing.Unit.Pixel(0);
                    return Telerik.Reporting.Drawing.Unit.Pixel(lvl * 15);

    in textbox bindings property I added one new binding with the following:
    Property Path :  Style.Padding.Left
    Expression:  = GetLeftPadding(CDbl(Fields.Lvl))

    What could the reason? Any help would be appreciated.

  2. Answer
    Peter avatar
    1631 posts

    Posted 20 Dec 2010 Link to this post

    Hello Arun Kumar,

    Unfortunately you are correct and we were able to reproduce the problem. I've logged this issue in our bug tracking system and it would be addressed in a subsequent version of the product. As a workaround our suggestion is to set the value to an user function that will add empty space as shown in the following code snippet:

    public static object GetLeftPadding(double lvl, object value)
                if (lvl <= 1)
                    return value;
                    return " "+value;

    Your Telerik points have been updated for bringing this to our attention. Sorry for the inconvenience.

    the Telerik team
    Get started with Telerik Reporting with numerous videos and detailed documentation.
Back to Top