invoke dropdownlist selection on page load?

3 replies. Last post: April 27, 2012 3:18 AM by Hans Kristian
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Frank GaryMember

Gentlemen,

I am struggling with a critical implementation issue as follows:

Background:

1). I have a SysCompanyDropdownlist1 implemented on my webscheduler control. The dropdownlist is bound to my intersoftdataset into a "SysCompany" table that displays "Companies" in the dropdown list, (based on SysCompanyID).

2). In my master ISDataSource1 the resources table has a clause - WHERE (SysCompanyID = @Param1) OR (SysCompanyID = @Param2) OR (SysCompanyID = @Param3) OR (SysCompanyID = @Param4) OR (SysCompanyID = @Param5) OR (SysCompanyID = @Param6)

and these parameters are defined as 1 for Param1, 2 for Param2, 3 for Param3, etc in the ISDataSource1 Resources "Define Parameters" where the parameters source is my SysCompanyDropdownlist1

3). This is all working. When I pick company 1 from the dropdown list, only company 1 resources and events are displayed, when I pick company 2 from the dropdown list only company 2 resources and events are displayed and etc.

4). Recently I posted a question/resolution regarding loading the webscheduler with a default date passed externally into the webscheduler and it works perfectly: http://www.intersoftpt.com/Community/WebScheduler/Passing-default-dates-into-timeline-view/

My Problem:

1). I am now trying to load the webscheduler with the default SysCompanyID externally similar to passing the dates into the webscheduler as outlined in #4 above.

2). The externally passed default SysCompanyID is passing into the webscheduler SysCompanyDropdownlist1 perfectly on page load.

3). The problem is although the default SysCompanyID is passing into the webscheduler SysCompanyDropdownlist1 perfectly on page load, the initial data is showing for ALL companies, like the query never happened on page load. However, if I change the company after the initial page load the query shows the right information. For example:

Initial Webscheduler Page load shows externally passed syscompany 2 in the SysCompanyDropdownlist1 but shows data for ALL companies. If I then select syscompany 1 in the SysCompanyDropdownlist1 it works and I get only the data for syscompany1, if I then select syscompany2 I get only the data for syscompany2.

My problem is that even though the syscompanyid is being passed into the webscheduler externally on page load, and shows correctly in the SysCompanyDropdownlist1, on initial page load it is not running the parameterized query at all, until I reinvoke the SysCompanyDropdownlist1 again after page load.

I am assuming something needs to execute either on page load or in a client side event?

If I can provide additional information, images, code files etc please let me know. I have attached my webscheduler code behind file for reference.

I would greatly appreciate assistance on this challenge.

Thanks - Frank Gary

1 attachment
All times are GMT -5. The time now is 12:38 AM.
Previous Next