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

Cannot set combobox values after user leaves site

5 Answers 34 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Phillip
Top achievements
Rank 1
Phillip asked on 21 Jan 2015, 10:43 PM
I am using the telerik ajax controls with an asp.net 4.0 website.  The default page is using the radajaxmanager control.  The page also has two radcombobox controls.  Server side OnItemsRequested events are used to populate the rad combo box controls.  A rad multipage control is also on the page.  Each page in the rad multi page displays rad grids based on the selections for the two rad combo box controls.  Session state is used to store the selections from the two radcombobox controls.  Object datasources use these session variables to populate the grids.

The problem is that a user can leave the website without closing the browser and then return to the website using a back button or favorite item.  The combo boxes to not show the previous selections.  However, the grids use the session variables to display the data.  I have been unable to set the radcombobox values.  It appears that th page load event does not fire.

I cannot remove the rad ajax manager because a tab strip control is also used.  The page needs javascript methods to control the tabs.

Do you have any suggestions?

5 Answers, 1 is accepted

Sort by
0
Phillip
Top achievements
Rank 1
answered on 22 Jan 2015, 04:53 PM
My initial idea is to use custom attributes to store the information I need in the two comboboxes.  These custom attributes would eliminate the need for the session object that the object data sources use to load the grids.

My other idea is to use user controls inside each PageView tag instead of separate page.  That should eliminate the need for all session objects.
0
Phillip
Top achievements
Rank 1
answered on 23 Jan 2015, 10:30 PM
I changed the site to dynamically load the tab strip and page controls.  That corrected the problem of having the session objects available to load the grids.  The tabs and grids no longer display after changing sites and returning.  The user must now select values from the drop downs to populate the grids. 

However, now I have a new problem.  I select a tab and the page displays fine.  But, when I press a button.  I get a JScript runtime error "Sys.InvalidOperationException: Could not find updatepanel with ID PV4_userConyrol_ReportViewer1_ReportViewer/  If it is being updated dynamically then it must be inside another UpdatePanel".

Each tab is loading a user control at run time.  The default page that loads the controls has only one RadAjaxLoadingPanel control. I have deleted the RadAjaxLoadingPanel from the pages that are no longer used.  The error still occurs.  The ReportViewer control is in the page markup.  The only thought I have is that the an ajax entry needs to be made in the markup so that the ReportViewer control is updated.  .

Do you have any suggestions? 
0
Nencho
Telerik team
answered on 26 Jan 2015, 03:59 PM
Hello Phillip,

Glad to see that you were able to overcome the previous faced issues by yourself. As for the currently experienced one, we would need some more information. Could you provide us with the implementation that you use for the ReportViewer and the markup, where it is nested in? In addition, please specify which version of our controls are you currently using?

Regards,
Nencho
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Phillip
Top achievements
Rank 1
answered on 26 Jan 2015, 06:02 PM
The report viewer control is in the user control.  I am using the Telerik UI for Asp.net Ajax Q1 2014 SP1. 
The usercontrols are loaded at run time.  There is no markup to view at in the browser.

The report viewer control is dynamically loaded to a user control.  The user control is nested inside a RadMultiPage control.  The user control is one of the pages.  I have one user control for each page in the RadMultiPage control.  The nesting would be (RadMultiPage)(UserControl)(ReportViewer)(UserControl)(RadMultiPage)


0
Nencho
Telerik team
answered on 29 Jan 2015, 11:37 AM
Hello Phillip,

Generally, such javascript error would appear if you have ana ajax setting for control which is not yet available on the page. This is the reason why, I would like to ask toy to demonstrate us the approach that you use for dynamically creation of the controls.

In addition, in the below documentation article, you may find the approach that we suggest for implementation of the ReportViewer in Ajaxified scenario:

http://www.telerik.com/help/reporting/asp-net-report-viewer-ajax.html

Regards,
Nencho
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
ComboBox
Asked by
Phillip
Top achievements
Rank 1
Answers by
Phillip
Top achievements
Rank 1
Nencho
Telerik team
Share this question
or