Error on adding a radgrid on the page
Hello Team,
Thanks for the quick response.
I am getting an error when trying to add radgrid on the page and click edit button of the grid control, the delete button is also not working the full error message is:
Object does not match target type.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Reflection.TargetException: Object does not match target type.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[TargetException: Object does not match target type.]
System.Reflection.RuntimeMethodInfo.CheckConsistency(Object target) +9355927
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +100
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +28
System.SecurityUtils.MethodInfoInvoke(MethodInfo method, Object target, Object[] args) +163
System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component) +109
[TargetInvocationException: Property accessor 'NegativeStyle' on object 'Telerik.Web.UI.GridHeaderContextMenu' threw the following exception:'Object does not match target type.']
System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component) +400
Telerik.Sitefinity.Modules.Pages.Web.Services.WcfPropertyManager.AddPropertiesRecursively(Object instance, IList`1 list, List`1 propertyDescriptorHierarchy, ControlData controlData, Int32 depth, CultureInfo culture) +208
Telerik.Sitefinity.Modules.Pages.Web.Services.WcfPropertyManager.AddPropertiesRecursively(Object instance, IList`1 list, List`1 propertyDescriptorHierarchy, ControlData controlData, Int32 depth, CultureInfo culture) +367
Telerik.Sitefinity.Modules.Pages.Web.Services.WcfPropertyManager.AddPropertiesRecursively(Object instance, IList`1 list, List`1 propertyDescriptorHierarchy, ControlData controlData, Int32 depth, CultureInfo culture) +367
Telerik.Sitefinity.Modules.Pages.Web.Services.WcfPropertyManager.GetProperties(Object instance, ControlData controlData, Int32 depth, String parentPropertyPath, CultureInfo culture) +253
Telerik.Sitefinity.Web.UI.PropertyEditor.GetPropertyBag() +145
Telerik.Sitefinity.Web.UI.PropertyEditor.GetScriptDescriptors() +695
System.Web.UI.ScriptControlManager.RegisterScriptDescriptors(IScriptControl scriptControl) +126
Telerik.Sitefinity.Web.UI.AjaxDialogBase.Render(HtmlTextWriter writer) +103
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +65
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +270
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +26
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +9
System.Web.UI.Control.Render(HtmlTextWriter writer) +10
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +65
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +270
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +26
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +177
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +31
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +313
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +65
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +270
System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +53
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +9
System.Web.UI.Page.Render(HtmlTextWriter writer) +30
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +65
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +270
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +26
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8662
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3)
Timestamp: Wed, 18 May 2011 14:37:58 UTC
Hi Rohit,
This appears to be a bug in our system. I will forward the issue to our teams so they can fix it as soon as possible. In the meantime you can still use the RadGrid in a user control or page, but you need to set it up programatically. You can have a look at our demo page which contains few demonstrations of the functionality of this control.
Kind regards,
Victor Velev
the Telerik team
Actually this is happening with possibly all RadControls. It is happening for me with the RadPanelBar when set as a property for my user control. My workaround was making the RadPanelBar a static property. Any status on this bug fix would be greatly appreciated.
Hello Basem,
I created a simple user control in Sitefinity 4.2 with the following code in its template
<telerik:RadPanelBar runat="server" ID="RadPanelBar1" ></telerik:RadPanelBar>
and code behind
public RadPanelBar Panel
get
return this.RadPanelBar1;
which allowed me to select all RadPanelBar properties without exception.
Greetings,
Ivan Dimitrov
the Telerik team