search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

ClientObjectName (commandCallBack) doesnt work

Asked by Anonymous
14 years ago.

Hi Dan,

I am trying to use the command call back on client javacript. which i set ClientObjectName at the scheduler

and call at javascript as dpc1.commandCallBack('update');

Protected Sub DayPilotScheduler1_Command(ByVal sender As Object, ByVal e As DayPilot.Web.Ui.Events.CommandEventArgs) Handles DayPilotScheduler1.Command

Select Case e.Command
Case "update"
' Response.Write("run here")
BindData()
End Select
End Sub

I try to to a databinding but it seem cant work. sometimes i encouter that dpc1 is unknown.

What did i missing here.. hope you can help. Thanks

Comment posted by Dan Letecky
14 years ago.

The object (named as specified using ClientObjectName property) should always be available. You can check the page source code to see if it's used properly (search for /* DayPilotPro: 5.8.1956.0 */ string to see the JavaScript generated by DayPilot).

Two notes about the Command event handler:

1. Response.Write doesn't work here, it's an AJAX callback and it would corrupt the output.

2. You must call Update after binding the data:

DayPilotScheduler1.Update()

This tells the control to refresh the data on the client side. Otherwise nothing happens.

You might also want to check the tutorials section for working VB.NET examples.

Comment posted by Anonymous
14 years ago.
Thanks Dan,
I am using the TutorialHotel as an example.
Just wanna find out from you if i not using the modal pop up in the sample, instead i am using Yahoo Yui scripting , will it affect the callback event?
Another question is i have a 3 column resources for my scheduler, when i try to do a form.submit at client side,
the 2nd and 3nd resource will went missing even i do a resource loading when it postback.
This wont happen if my resource is only one column, i been looking for this issue for long time. hope you can guide me.thanks.
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.