More in this section

Forums / Developing with Sitefinity / Error on adding a radgrid on the page

Error on adding a radgrid on the page

4 posts, 0 answered
  1. Rohit
    Rohit avatar
    11 posts
    Registered:
    06 Jan 2011
    19 May 2011
    Link to this post
    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


    And i also get  javascript error that is :
    Message: Object doesn't support this property or method
    Line: 2571
    Char: 1
    Code: 0
    URI: http://localhost:28400/TestForRadgrid/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl10_TSM&compress=0&_TSM_CombinedScripts_=%3b%3bTelerik.Sitefinity%2c+Version%3d4.1.1395.0%2c+Culture%3dneutral%2c+PublicKeyToken%3db28c218413bdf563%3aen%3a23b191f9-0e65-49d2-9fd3-ce236417ac7b%3a80c147f%3ac1fc658e%3a447a22b8%3bTelerik.Web.UI%2c+Version%3d2011.1.413.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen%3a71598907-ed61-48cf-848a-7bcbb14d6dd6%3aa7e79140%3bTelerik.Sitefinity%2c+Version%3d4.1.1395.0%2c+Culture%3dneutral%2c+PublicKeyToken%3db28c218413bdf563%3aen%3a23b191f9-0e65-49d2-9fd3-ce236417ac7b%3abfb08809%3bTelerik.Web.UI%2c+Version%3d2011.1.413.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen%3a71598907-ed61-48cf-848a-7bcbb14d6dd6%3a854aa0a7%3a5a6d9d23%3a8e6f0d33%3a6a6d718d%3a4cacbc31%3bTelerik.Sitefinity%2c+Version%3d4.1.1395.0%2c+Culture%3dneutral%2c+PublicKeyToken%3db28c218413bdf563%3aen%3a23b191f9-0e65-49d2-9fd3-ce236417ac7b%3ac973fe33%3a1c208a1%3bTelerik.Web.UI%2c+Version%3d2011.1.413.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen%3a71598907-ed61-48cf-848a-7bcbb14d6dd6%3ae4f8f289%3bTelerik.Sitefinity.Resources%2c+Version%3d4.1.1395.0%2c+Culture%3dneutral%2c+PublicKeyToken%3dnull%3aen%3ac3497b39-708d-486e-8f36-fdbdd2633cd0%3a64f47370%3a426fd8ce%3bTelerik.Sitefinity%2c+Version%3d4.1.1395.0%2c+Culture%3dneutral%2c+PublicKeyToken%3db28c218413bdf563%3aen%3a23b191f9-0e65-49d2-9fd3-ce236417ac7b%3aad151817%3a1aa9fbd3%3ad0084f36%3a53b80dcc%3ac416fb1c

    I am using a trial version of Sitefinity 4.1
    Please help me to short it out.

    Thanks
    Rohit

  2. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    24 May 2011
    Link to this post
    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
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Basem
    Basem avatar
    131 posts
    Registered:
    22 Dec 2010
    10 Aug 2011
    Link to this post
    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.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    11 Aug 2011
    Link to this post
    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
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
4 posts, 0 answered