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

Ajax Request: "79|error|500|Specified argument was out of the range of valid values.

2 Answers 119 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Bert
Top achievements
Rank 1
Bert asked on 04 Aug 2008, 08:48 AM
Hi,

I have a problem with my RadTabStrip in combination with an ajax Request.
I can delete most tabs without any problem but when the number of deleted tabs becomes to big it gives me the following error. ex: when I have 25 tabs it always crashes on the 7th tab, when I have 3 tabs it crashes on the 3 tab.

The code of deleting a tab and pageview in javascript have I found in the online demo form the TabStrip. So I think the error is caused by the call of the AjaxRequest (last line in source code). In the eventhandler for the AjaxRequest I don't do anything at this moment so that can't also not be the problem.

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Specified argument was out of the range of valid values.
Parameter name: index

function deleteTab(tabValue)  
{   
 
    var tabStrip = $find("<%= rtsTabs.ClientID %>");  
    var multiPage = $find("<%= multiPage.ClientID %>");   
 
    tabStrip.trackChanges();  
    multiPage.trackChanges();   
 
    var tab = tabStrip.findTabByValue(tabValue);  
    var pageView = tab.get_pageView();  
    var tabtabToSelect = tab.get_nextTab();      
    if (!tabToSelect)  
        tabtabToSelect = tab.get_previousTab();   
 
    tabStrip.get_tabs().remove(tab);  
    multiPage.get_pageViews().remove(pageView);  
 
    if (tabToSelect)  
        tabToSelect.set_selected(true);   
 
    multiPage.commitChanges();  
    tabStrip.commitChanges();  
 
    var arg = "removed/" + tabValue;  
    $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest(arg);   
 
}  
 
 


Can someone help me with this?

Thanks

Bert

2 Answers, 1 is accepted

Sort by
0
Bert
Top achievements
Rank 1
answered on 05 Aug 2008, 07:36 AM
nobody?
0
Nikolay Rusev
Telerik team
answered on 05 Aug 2008, 01:44 PM
Hi Bert,

Please make sure that you have tabValue parameter set correctly.

Regarding the code in this online demo, it is working as
expected. 
 It seems like the error is raised server-side and after that in your Javascript code.

Best regards,
Nikolay
the Telerik team


Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
Bert
Top achievements
Rank 1
Answers by
Bert
Top achievements
Rank 1
Nikolay Rusev
Telerik team
Share this question
or