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

Pass and receive a variable to event move

Asked by LouLou
13 years ago.

Hi. I need to pass a variable to event move from the client side. I'm working with this code:

Sending with
function moveEvent(e, newStart, newEnd, oldColumn, newColumn) {
var myArray = ['a', 'b', 'c'];
dpc1.eventMoveCallBack(e, newStart, newEnd, oldColumn, newColumn, myArray);

Receiving with
string state = (string)e.Data[0];

I get this error:
The JsonData instance has to be initialized first

Is the error in the system or am I doin something wrong. It seems such a simple need (to pass and receive a variable) but whatever I do it dont work.....

Comment posted by LouLou
13 years ago.

Hi - I managed it but did it different. I sent a callback using

dpc1.commandCallBack('shift', "xxx");

and received it here:

protected void DayPilotCalendar1_Command(object sender, DayPilot.Web.Ui.Events.CommandEventArgs e)
if (e.Command == "shift")
string isShifton = Convert.ToString(e.Data);

if (isShifton == "xxx")
Session["shifty"] = "xxx";

Then the session variable allowed me to do the manipulation I wanted



This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.