hello all ,
i am using telerik Reporting service ..
i get panel from itemdatabound handler and i want to add dynamically textbox how can i do this ????
here is the MyPanel_ItemDataBound handller code
void MyPanel_ItemDataBound(object sender, EventArgs e)
{
Processing.ReportItemBase itemBase = (sender as Processing.ReportItemBase).Parent;
Processing.DetailSection section = (itemBase as Processing.DetailSection);
Processing.ReportItemBase[] NetPanels = (Processing.ReportItemBase[])section.Items.Find("NetPanel", false);
if (NetPanels.Length > 0)
{
Processing.Panel MyPanel = NetPanels[0] as Processing.Panel;
Telerik.Reporting.TextBox labelCaption = new Telerik.Reporting.TextBox();
labelCaption.Name = nestedData.Month.ToString() + "_" + EmployeeID.ToString();
labelCaption.Value = nestedData.Month.ToString();
labelCaption.Size = new SizeU(new Unit(40), new Unit(40));
labelCaption.Location = new PointU(ChildLocation, new Unit(10));
labelCaption.Style.BorderWidth.Bottom = new Unit(10, UnitType.Pixel);
labelCaption.Style.BorderWidth.Top = new Unit(10, UnitType.Pixel);
labelCaption.Style.BorderWidth.Right = new Unit(10, UnitType.Pixel);
labelCaption.Style.BorderWidth.Left = new Unit(10, UnitType.Pixel);
labelCaption.Style.BackgroundColor = Color.Black;
labelCaption.Style.Color = Color.White;
MyPanel,Items.Add(labelCaption); // compilation error here
"Error 103 Argument '1': cannot convert from 'Telerik.Reporting.TextBox' to 'Telerik.Reporting.Processing.ReportItemBase' "
}
}
i am using telerik Reporting service ..
i get panel from itemdatabound handler and i want to add dynamically textbox how can i do this ????
here is the MyPanel_ItemDataBound handller code
void MyPanel_ItemDataBound(object sender, EventArgs e)
{
Processing.ReportItemBase itemBase = (sender as Processing.ReportItemBase).Parent;
Processing.DetailSection section = (itemBase as Processing.DetailSection);
Processing.ReportItemBase[] NetPanels = (Processing.ReportItemBase[])section.Items.Find("NetPanel", false);
if (NetPanels.Length > 0)
{
Processing.Panel MyPanel = NetPanels[0] as Processing.Panel;
Telerik.Reporting.TextBox labelCaption = new Telerik.Reporting.TextBox();
labelCaption.Name = nestedData.Month.ToString() + "_" + EmployeeID.ToString();
labelCaption.Value = nestedData.Month.ToString();
labelCaption.Size = new SizeU(new Unit(40), new Unit(40));
labelCaption.Location = new PointU(ChildLocation, new Unit(10));
labelCaption.Style.BorderWidth.Bottom = new Unit(10, UnitType.Pixel);
labelCaption.Style.BorderWidth.Top = new Unit(10, UnitType.Pixel);
labelCaption.Style.BorderWidth.Right = new Unit(10, UnitType.Pixel);
labelCaption.Style.BorderWidth.Left = new Unit(10, UnitType.Pixel);
labelCaption.Style.BackgroundColor = Color.Black;
labelCaption.Style.Color = Color.White;
MyPanel,Items.Add(labelCaption); // compilation error here
"Error 103 Argument '1': cannot convert from 'Telerik.Reporting.TextBox' to 'Telerik.Reporting.Processing.ReportItemBase' "
}
}