This is a migrated thread and some comments may be shown as answers.

Tooltip inactive for a period of time and then it throws error

1 Answer 30 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Sameers
Top achievements
Rank 1
Sameers asked on 28 Sep 2011, 10:12 AM
This question is once again related to the page I created and discussed here.

I noticed that if the page is inactive for a period of time, say, 10-15 minutes. and then I mouse over on the grid column to display tool tip, I get exception. 

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Exception occurs when I try to add control for tooltip using statement

e.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrl)

Here is the Stack trace.

at System.Collections.ArrayList.get_Item(Int32 index)
at Telerik.Web.UI.GridColumnCollection.System.Web.UI.IStateManager.LoadViewState(Object savedState)
at Telerik.Web.UI.GridTableView.LoadStructureState(Object SavedStructure)
at Telerik.Web.UI.RadGrid.LoadTableViewStructure(IEnumerator stateEnumerator, GridTableView tableView)
at Telerik.Web.UI.RadGrid.LoadViewState(Object savedStateObject)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.AddedControl(Control control, Int32 index)
at System.Web.UI.ControlCollection.Add(Control child)
at CoreWebAdmin.OrderProductSummary.radToolTipManager_AjaxUpdate(Object sender, ToolTipUpdateEventArgs e) in J:\Work\Yitz\eBayPosting\CoreWebAdmin\Orders\OrderProductSummary.aspx.vb:line 1557
at Telerik.Web.UI.RadToolTipManager.OnAjaxUpdate(ToolTipUpdateEventArgs e)
at Telerik.Web.UI.RadToolTipManager.LoadClientState(Dictionary`2 clientState)
at Telerik.Web.UI.RadWebControl.LoadPostData(String postDataKey, NameValueCollection postCollection)
at Telerik.Web.UI.RadWebControl.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection)
at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Note that I have about 10 columns in the grid, and about 8 columns are displaying tooltip. Each tooltip has different data but almost same structure of the controls to be added into tooltip. (They all use Table object which contains a RadGrid and some other controls maybe). 

   I noticed that this error occures on one or two columns, but not on all columns. If I try to display tooltip on other columns and then try back on the specific columns where it had above errors, it display them fine. I am not sure why?

   Do you think I can solve this issue by disabling ViewState on the page (or on some specific control)? Or if there is any other idea, please share.


   Thanks,
   Sameers

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 30 Sep 2011, 12:02 PM
Hi Sameers,

I'm afraid that this information is not sufficient to find the cause of this issue. A likely reason for a server exception after a period of inactivity is the session having timed out on the server, so you may still want to examine this code library. I am not sure if this is the case here, especially if other columns work as expected if they are the first to be hovered, though, but you have not provided this information. If they also throw the exception on the first hover and things are fine on subsequent then this is the most likely cause.

This is quite a generic server error and another possible reason is that something on the server (the user control or whatever is it that you are loading) tries to access an array index that is out of range and this is where the error occurs. 

f this assumption is correct, my suggestion is to attach a debugger to the OnAjaxUpdate method that you are using with the RadToolTipManager and trace where the problem is coming from and what exactly index is out of range.

In case that you are not able to resolve the issue on your own, please send us a working project that demonstrates the problem and we will examine it promptly.

Another thing I see is that the last version you have downloaded is quite old, so I'd advise that you upgrade to the latest (currently Q2 2011), since many fixes and improvements have been made for the past two years.


All the best,
Marin
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
Tags
ToolTip
Asked by
Sameers
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or