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

Textbox style bindings not working

1 Answer 213 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Arun Kumar
Top achievements
Rank 2
Arun Kumar asked on 15 Dec 2010, 09:41 AM
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);
            else
                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.

Thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 20 Dec 2010, 08:51 AM
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;
            else
                return " "+value;
        }

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

Regards,
Peter
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
Tags
General Discussions
Asked by
Arun Kumar
Top achievements
Rank 2
Answers by
Peter
Telerik team
Share this question
or