Viewstate and Expandmode=ServerSideCallBack

7 posts, 0 answers
  1. christopher willis
    christopher willis avatar
    47 posts
    Member since:
    Sep 2006

    Posted 02 May 2008 Link to this post

    I have a tree that I build with Load on Demand
    (.ExpandMode = TreeNodeExpandMode.ServerSideCallBack)

    The tree gets large, and after clicking and expanding, the ajax post and response sizes get huge fast, (for example, one time I saw 1MB up and down).  This is too much data, and ajax timeouts start to pop up because of the delays.

    So I turned off the tree ViewState.  When I do that, only the first nodeclick or expand works, any nodeclicks or expands after the first get a client side error:

    Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Specified argument was out of the range of valid values.
    Parameter name: Cannot find item with hierarchical index 0:0

    Am I doing something wrong, or does ServerSideCallBack require ViewState?

    P.S.  -- I recently converted the tree from the classic tree, and I dont remember this hugh ajax post size problem with the old version.
  2. Dimitar Milushev
    Admin
    Dimitar Milushev avatar
    555 posts

    Posted 05 May 2008 Link to this post

    Hi christopher willis,

    If you disable the TreeView's Viewstate, you need to add the initial nodes to the TreeView during postbacks too, not only on first load.

    The large size is probably not caused by the TreeView's Viewstate, but by the TreeView's new functionality to persist load on demand nodes between postbacks. When a regular postback occurs, the size of the ajax post is reset, but if you prefer you can disable this functionality by setting PersistLoadOnDemandNodes="false" to the RadTreeView and the ajax post size won't grow when expanding load on demand nodes.

    Sincerely yours,
    Dimitar Milushev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. christopher willis
    christopher willis avatar
    47 posts
    Member since:
    Sep 2006

    Posted 05 May 2008 Link to this post

    I think there may be a problem with ViewState growing when clicking on the nodes created with using ServerSideCallBack.  Clicking on nodes created in this manner has the ViewState growing by 1-2k each post initially, and grows faster on when you open up the tree nodes.  Note, that is the same node being clicked repeatedly.  I would expect the same node being clicked repeatedly would have about the same ViewState. 

    Clicking same node response byte sizes:
    414448
    428456
    442468
    456064
    470072

    I switched to PersistLoadOnDemandNodes = false, and the post size stayed constant.  However, now the server tree_NodeClick event doesn't fire on load on demand nodes.  How do I get around that?
  4. Dimitar Milushev
    Admin
    Dimitar Milushev avatar
    555 posts

    Posted 16 May 2008 Link to this post

    Hello,

    This issue was resolved with the recently released Service Pack.

    Regards,
    Dimitar Milushev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. Robert
    Robert avatar
    8 posts
    Member since:
    Mar 2008

    Posted 26 Aug 2008 Link to this post

    I am also having a problem with performance degrading rapidly when I go from 30 rows to 100 rows. 20 seconds to load.

    Changing "PersistLoadOnDemand" greatly increased performance, but then I receive "the specified cast is not valid" on any node click.

    The service pack you mention specifically addresses this performance issue? I am still running on 2008 Q1.

    Rob

  6. Rob Conley
    Rob Conley avatar
    47 posts
    Member since:
    Sep 2012

    Posted 27 Aug 2008 Link to this post

    The latest release did significantly speed things up.

    Any other suggestions are welcome.

    Rob
  7. wajahat
    wajahat avatar
    1 posts
    Member since:
    Apr 2009

    Posted 08 Jun 2009 Link to this post

    Hello,

    i m using Q12009 and the same exception comes when i click on edit button of my radgrid. my page contains 2 grids but they are separate.plz help me.

    thanks
Back to Top