Home Unanswered Active Tags New Question

clientState not working in daypilot calendar

I am trying to get the clientState to work but i am getting the follow-up error:
base {System.SystemException} = {"The JsonData instance has to be initialized first"}

code:
string userId = (string)DayPilotCalendar1.ClientState["userId"];

javascript:
dpc1.clientState = {'userId': 1};

Any ideas ?

Asked by Anonymous 9 months ago.
1 other person also wants an answer.
Replies

The clientState value is only synchronized during calls that are coming from the DayPilot control (either PostBack or CallBack).

That means it's not available on the server side when you push a Button or fire another event.

Is that your case?

Answer posted by Dan Letecky [DayPilot] 9 months ago.

I am using the dpc1.commandCallBack function.

Comment posted by Anonymous 9 months ago.

I've tested it with the latest release (6.5) and it seems to work fine.

What's the DayPilot version you are using?

Comment posted by Dan Letecky [DayPilot] 9 months ago.
New Reply
This reply is
Your name (optional):

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