User Profile & Activity

Way Hang Wee Member
Page
of 6
Posted: February 3, 2010 9:16 PM

How should i called the function?

I have 2 functions defined as below, wtvActivity_OnNodeCheckedChanged is called without problem but not RefreshScheduler:

<script language="javascript" type="text/javascript"> function wtvActivity_OnNodeCheckedChanged(controlId, node) {var WebTreeView1 = ISGetObject(controlId);var inputid = document.getElementById("Hidden1").value;var hidden1 = document.getElementById(inputid);var checkedNodes = WebTreeView1.GetCheckedNodes();var a = new Array();hidden1.value = "";for (var i = 0; i < checkedNodes.length; i++) {

a[i] = checkedNodes[i].Name;

if (hidden1.value == "")

{ hidden1.value = a[i]; }

else { hidden1.value = hidden1.value + "," + a[i]; }

}

return true;

}

function RefreshScheduler() {var sched = ISGetObject("wsSchedule");

sched.RefreshAll();

}

</script>

 

Below is the code how i called the function:

<ISWebScheduler:WebScheduler ID="wsSchedule" runat="server" CategoriesDataMember="ttCategories" DataSourceID="ISDSSchedule"

EventsDataMember="ttEvents" Height="600px" RecurrenceDataMember="ttRecurrenceInfo" RecurringEventsDataMember="ttRecurringEvents" ResourcesDataMember="ttResources" Width="800px" OnDataBinding="RefreshScheduler">

I tested with all other client side events OnDataBinding / OnDataBound / OnInit / OnInsert / OnLoad / OnPreInitialize / OnPreRender / OnUpdate.

 

and i get error:

BC30456: 'RefreshScheduler' is not a member of 'ASP.schstaffplanner_aspx'.

Pls advise.

Posted: February 3, 2010 3:08 AM

The code should be placed in client/server site?

Can u provide a sample?

Thanks!

Posted: February 2, 2010 11:01 PM

Hi Glenn,

Now my  WebScheduler can connect to different database dynamically during run time, but there's another issue.

Initially there's no record in Events and RecurringEvents table. So when my system load the page with WebScheduler, the WebScheduler will show calendar only as there's no event yet.

On the same page, i have button to insert record into Events and RecurringEvents table. When i click the button and insert record and the page is post back, the content in WebScheduler is not updated accordingly, the WebScheduler still show calendar only without any event. I need to refresh the page manually in order for the WebScheduler to "refresh".

How can i make the WebScheduler to "refresh" during post back after the button is clicked?

Pls advise

Posted: February 2, 2010 1:05 AM

ok, it works now!

Thanks!

Posted: February 1, 2010 3:01 AM

I hit this error when run the provided code:

Unable to cast object of type 'System.Data.SqlClient.SqlConnection' to type 'System.Data.OleDb.OleDbConnection'

 

Pls advise

Posted: January 29, 2010 3:29 AM

I tried put the code in  ISDataSource object created server side event, but the event is not fired when run. You may tried out my previous sample.

For the code u gave previously is in csharp rite, how about vb code?

Hi Andi,

I put the data binding in initialize data source but the data seems like not bound?

Attached is the sample code.

Pls advise.

Thanks!

Posted: January 28, 2010 10:48 PM

I inserted 2 for RecurrenceInfo.Mode and 0 for RecurrenceInfo.RangeMode then it shows correctly. But i would like to know what does it meant when RecurrenceInfo.Mode = 2 and RecurrenceInfo.RangeMode = 0?

Then regarding your previous post you said we could modify the connection string programatically during ISDataSource object created server side event using reflection. From your snippet, you only change the .mdb? How if i would like to change the connection string as below:

Data Source=DEVDB01\SQLEXPRESS;Initial Catalog=Optimizer_01;Persist Security Info=True;User ID=saUser;Password=saPassword

to

Data Source=DEVDB01\SQLEXPRESS;Initial Catalog=Optimizer_02;Persist Security Info=True;User ID=saUser;Password=saPassword

Pls advise

Hi Andi,

 

I tested in the simple sample and it works. However in my project it doesn't work. I wonder it has to do with other component because i do have other component in my project which is WebTreeView.

Attached is the modified simple sample with WebTreeView. There's a "script" folder to create the table and insert data.

After i select record for WebCombo1 and WebCombo2, data will be populated in WebTreeView. When i check all the nodes in the WebTreeView and click the button, the system will insert data into database and PostBack. During PostBack, the WebCombo2.Value = "" but in fact there's selected record.

Pls advise.

Posted: January 27, 2010 4:33 AM

I tested bind all the required field, but it still show event in events table only.

Attached is the sample i did.

There's "script" folder and there's script to create tables and insert data.

Pls help! thanks!

All times are GMT -5. The time now is 3:17 AM.
Previous Next