Home Unanswered Active Tags New Question

commandCallBack within a daypilot calendar control

Hi, On my page (.aspx) there is a DayPilotCalendar control, I'm trying to use the following commandCallBack(command, data); The server-side method gets fired and I'm able to check the e.command however when I attempt to obtain the value in e.data (CType(e.Data, Integer)) I get the following error in VS2008:- Instance of JsonData can't be cast to Int32. I've also noticed the following:- Count = {"The JsonData instance has to be initialized first"} Does the calendar support commandCallBack(command,data)? I cant seem to find any info/docs... Only stuff relating to the Scheduler. Many thanks
Asked by Mike 1 year ago.
Replies

It's supported in all controls, including the Calendar.

I've tried the following code and it works fine:

.aspx file

<a href="javascript:dpc1.commandCallBack('test', 3);">Test</a>

.aspx.cs file

protected void DayPilotCalendar1_Command(object sender, CommandEventArgs e)
{
  switch (e.Command)
  {
    case "test":
      int value = (int) e.Data;
      break;
  }
}

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

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