In my report I dynamically add textboxes using :
// txt.Name = myString;
detail.Items.AddRange(new Telerik.Reporting.ReportItemBase[] { txt });
After adding the textbox I need to find it again by it's name held in myString but cant seem to figure it out.
Any Ideas?
The problem I have is that I have a datasource which contains an unknown number of fields apart from 1 which I will refer to as "FieldA".
I Set datasource to null, get my datatable and loop through each column. I then generate a textbox at run time and give it a value and add it to the report. I do this for all fields apart from "FieldA". FieldA has its own textbox so all I have to do is :
this.txtFieldA.Value = "Whatever";
I have noticed that when I run my report only FieldA is properly updated with the correct value. All the other textboxes contain the same information from the first row of the datatable.
I can only assume this is happening because the textbox for FieldA was added at design time and the rest at run time.
My thought is that maybe I should add each text box THEN add a value to them instead of giving each textbox a value then adding it.
// txt.Name = myString;
detail.Items.AddRange(new Telerik.Reporting.ReportItemBase[] { txt });
After adding the textbox I need to find it again by it's name held in myString but cant seem to figure it out.
Any Ideas?
The problem I have is that I have a datasource which contains an unknown number of fields apart from 1 which I will refer to as "FieldA".
I Set datasource to null, get my datatable and loop through each column. I then generate a textbox at run time and give it a value and add it to the report. I do this for all fields apart from "FieldA". FieldA has its own textbox so all I have to do is :
this.txtFieldA.Value = "Whatever";
I have noticed that when I run my report only FieldA is properly updated with the correct value. All the other textboxes contain the same information from the first row of the datatable.
I can only assume this is happening because the textbox for FieldA was added at design time and the rest at run time.
My thought is that maybe I should add each text box THEN add a value to them instead of giving each textbox a value then adding it.