Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Dock > Invalid JSON primitive message

Not answered Invalid JSON primitive message

Feed from this thread
  • bkj avatar

    Posted on Sep 15, 2008 (permalink)

    If I dynamically add three items to a RadDockLayout, I get an error message: "Invalid JSON primitive: ." Any inter-action with the RadDock controlss after that causes the same error message to be displayed.

    Any ideas?


    Randy

    Reply

  • bkj avatar

    Posted on Sep 15, 2008 (permalink)

    After googling the issue, I found references to the issue (supposedly fixed in February) with the RadTree control. I am using the RadTree control as well as the RadDock controls on this page.

    I had assumed it was RadDock related -- but perhaps it is related to the RadTree. Was this fix ever posted? (I downloaded RadControls for ASP.NET AJAX in just the last month.)

    However, I also find that I can get this error by clicking on buttons added to the TitlebarTemplate.

    Reply

  • Sophy Sophy admin's avatar

    Posted on Sep 16, 2008 (permalink)

    Hi Robert,

    We already answered to the support ticket you have posted which includes this issue and in which you have provided some code snippets demonstrating the problem. For your convenience and to make the answer available to the community in case somebody experiences the same problem I will go ahead and paste our answer here as well:
    I created a sample page based on the code snippets you have sent us and was able to reproduce the issue you mention.
    It could be resolved by replacing the
    articlesZone.Controls.Add(aRadDock); with
    articlesLayout.Controls.Add(aRadDock);
    (as the RadDockLayout maintains the proper positioning of the RadDocks)
    in Page_Init - this is the reason for experiencing an "Invalid JSON primitive error" as the docks are duplicated at postback/callback in your case.

    Let us know if the above suggestion cannot help you resolve the issue.

    Kind regards,
    Sophy
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

    Reply

  • Joseph Pasint avatar

    Posted on Jul 15, 2009 (permalink)

    Our version: RadControls for ASP.NET Ajax - Q1 2009

    Sophy,

    We are facing the same issue and your suggestion
    "by replacing the articlesZone.Controls.Add(aRadDock); with articlesLayout.Controls.Add(aRadDock);  (as the RadDockLayout maintains the proper positioning of the RadDocks)
    in Page_Init"

    did not fix it for us. To re-iterate, we are also dynamically adding RadDock items to a RadDockLayout and upon any action such as double-clicking the RadDoc title, we receive the "Invalid JSON primitive" error.

    Was there a fix for this issue in our version or can you provide us with the sample code addressing this issue.

    Thanks.

    Reply

  • Pero Pero admin's avatar

    Posted on Jul 17, 2009 (permalink)

    Hello Joseph,

    This error is encountered because of an AJAX request conflict. When the RadDocks title-bar is clicked many times the DockPositionChanged event is fired more than once. Because the dock's AutoPostBack property is set to true, a couple of AJAX requests are fired even before any previous AJAX post back has finished. This on the other hand generates a duplicate of the RadDock and throws an exception.

    You can overcome this error by adding an AJAX Loading Panel that will ensure the AJAX post back to be finished before a new one is started. For your convenience, I have attached a sample project, that shows how this can be done.



    Kind regards,
    Pero
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
    Attached files

    Reply

  • Rama avatar

    Posted on Jan 23, 2012 (permalink)

    Hello ,

    Even after implementing the AJAX Loading Panel , still i am gettting the Invalid JSON Error (Dock getting cloned), I am using RadAjaxmanagerproxy.

     

     

    var manager = RadAjaxManager.GetCurrent(Page);

     

    manager.ClientEvents.OnRequestStart =

     

    "RequestStart";

     

    manager.ClientEvents.OnResponseEnd =

     

    "ResponseEnd";

     


    Best Regards
    Pradyumna

    Reply

  • Slav Slav admin's avatar

    Posted on Jan 25, 2012 (permalink)

    Hi Rama,

    Please ensure that the AJAX Loading Panel covers the RadDock controls. This way when an AJAX request is initiated the Loading Panel will appear over the RadDocks and it won't be possible to click on them in order to send another request until the first one is processed.

    Note that I am mostly guessing as to what your current setup is and I will be able to suggest a more useful solution if I am aware of the way you have implemented your scenario. Please open a standard support ticket and send a simple, runnable project that demonstrates your case so that I can inspect it locally and provide a more to the point answer.

    Greetings,
    Slav
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Dock > Invalid JSON primitive message
Related resources for "Invalid JSON primitive message"

ASP.NET Dock Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  |  Step-by-step Tutorial  ]