Try RaiseControlEventMethod()Catch ex As Exception 'Do nothingEnd Try<telerik:RadPieChart> <telerik:PieSeries ItemsSource="{Binding AssetsData}" /></telerik:RadPieChart>private ElementCollection<PieDataPoint> assetsData;public ElementCollection<PieDataPoint> AssetsData { get { return assetsData; } set { assetsData = value; Notify("AssetsData"); } }PieSeries series = new PieSeries();series.RadiusFactor = 0.9; foreach (var entry in dataSource){ series.DataPoints.Add(new PieDataPoint() { Value = entry.Percentage, Label = entry.Title });} assetsData = series.DataPoints;
I am trying to add Telerik’s controls (like RadMaskedTextBox, RadNumericTextBox and RadDateInput controls) dynamically into a user control (under the Page_Init event) which is itself a child of another user control.
When I run the project, following exception occurred and nothing is shown in the user control.
“Microsoft JScript runtime error: Sys.ArgumentException: Value must not be null for Controls and Behaviors. Parameter name: element”
However, these controls are added directly on a .aspx page without any exception and it appeared that the Telerik’s controls get registered in the Page_PreRenderComplete event of an .aspx page and since this event does not exist in a user control therefore they are throwing the above exception.
Thanks & Regard's
