or
| public partial class CarReport : Report { |
| public CarReport() { |
| } |
| public CarReport(int id){ |
| Car c = GetFromDB.GetCar(23); |
| txtName.Value = c.Name; |
| txtType.Value = c.Type; |
| } |
| } |
| class GetFromDB { |
| public Car GetCar(int id) { |
| //Query Datbase and parse info |
| return new Car("FastCar", "Porsche"); |
| } |
| } |
| class Car { |
| private string strName; |
| private string strType; |
| public Car(string Name, string Type) { |
| strName = Name; |
| strType = Type; |
| } |
| public string Name { get { return strName; } } |
| public string Type { get { return strType; } } |
| } |
I'm trying to update the value of a textbox with the following code.
ReportViewer1.Report = (Telerik.Reporting.Report)new AllItems();
Telerik.Reporting.TextBox txt = (Telerik.Reporting.TextBox)ReportViewer1.Report.Items["txtTitle"];
txt.Value = "wow";
It errors out giving a "The expression contains object 'ID' that is not defined in the current context."
Can this be done?