I'm facing a huge difficulty trying to get a Report formatting certain items at ItemDataBinding.
My idea would be to build a "general purpose" report able to show informations from a DataSource and displaying each item of those datas in tow possible different ways:
- As a Label + TextBox
- As a Label + CheckBox
My DataSource looks like:
...and as you can see I'm binding it to the report at the NeedDataSource Event.
The Class MyDataRow contains:
- Group Field
- Type field
- Label field
- Text field
My Report Contains a Grouping, based on the "Group" field, and two TextBox bounded to the Label field and to the Text field of my MyDataRow. If I run the Report I can see all my datas correctly bounded.
The problem raises when I try to intervene on formatting of the two TextBox fields at DataBinding. Code follows:
As you ca see, if the Type field of my Datasource is "2" what I do is format my two TextBoxes in such a way that they look like a CheckBox and a label following. HERE RAISES THE PROBLEM !
What comes out of my report is that the formatting gets applied only after the first "Record" of my data source has been parsed. Attached You'll find a screen shot of what happens when I get to bind the part of the data source containing Records of type "2".
I'm relatively new to programming and especially with Telerik components, so I might have posted a "stupid" problem, but I'm going nuts.
Thanks for any help provided.