Good Day
i am using the telerik Report , i am trying to load the Report on page load in Silverlight. this used to work perfectly in a Silverlight Page, now i am using the report in a SilverlightChild Window and whenever my code reaches this pl
it fails with the Error
Specified argument was out of the range of valid values. Parameter name: childIndex
so to make sure that it does not find the elements i used the code like this
I see it does not find an element.
Thanks
i am using the telerik Report , i am trying to load the Report on page load in Silverlight. this used to work perfectly in a Silverlight Page, now i am using the report in a SilverlightChild Window and whenever my code reaches this pl
var layoutRoot = (FrameworkElement)VisualTreeHelper.GetChild(reportViewer, 0);
it fails with the Error
Specified argument was out of the range of valid values. Parameter name: childIndex
so to make sure that it does not find the elements i used the code like this
if
(VisualTreeHelper.GetChildrenCount(reportViewer) > 0)
{
var layoutRoot = (FrameworkElement)VisualTreeHelper.GetChild(reportViewer, 0);
var viewerModel = (ReportViewerModel)layoutRoot.DataContext;
var refreshCommand = viewerModel.RefreshReportCommand;
if
(refreshCommand.CanExecute(
null
))
{
refreshCommand.Execute(
null
);
}
}
I see it does not find an element.
Thanks