if i use the Telerik.Reporting.checkbox, i can set the value to true or false, then the checkbox will show its value. however, i am running a loop through the XML to find checkbox value. however, the checkbox is not shown being checked.
here is my code: what really tricks me is in the ele is Telerik.Reporting.Processing.CheckBox please let me know where i did wrong.
Telerik.Reporting.Processing.DetailSection processingDetail = (Telerik.Reporting.Processing.DetailSection)sender;
foreach (Telerik.Reporting.Processing.ReportItem item in processingDetail.Items)
{
if (item is Telerik.Reporting.Processing.Panel)
{
Telerik.Reporting.Processing.Panel pan = (Telerik.Reporting.Processing.Panel)item;
foreach (Telerik.Reporting.Processing.ProcessingElement ele in pan.ChildElements)
{
if (ele is Telerik.Reporting.Processing.TextBox)
{
if (ele.Name == node.Attributes["Flag"].Value.ToString().Replace("$#", "").Replace("#$", ""))
{
Telerik.Reporting.Processing.TextBox txt = (Telerik.Reporting.Processing.TextBox)ele;
txt.Value = node.InnerText;
}
}
if (ele is Telerik.Reporting.Processing.CheckBox)
{
if (ele.Name == node.Attributes["Flag"].Value.ToString().Replace("$#", "").Replace("#$", ""))
{
Telerik.Reporting.Processing.CheckBox chk = (Telerik.Reporting.Processing.CheckBox)ele;
if (node.InnerText == "X")
{
chk.Value = System.Windows.Forms.CheckState.Checked;
}
else
{
chk.Value = System.Windows.Forms.CheckState.Unchecked;
}
}
}
}
}
}
Many Thanks