Home Unanswered Active Tags New Question

Pass and receive a variable to event move

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.....


Asked by LouLou 1 year ago.
Replies

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

Thanks

LL
//756E6465727374616E64696E67756E6465727374616E64696E67756E6465727374616E64696E67

Comment posted by LouLou 1 year ago.
New Reply
This reply is
Your name (optional):

DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java