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

commandCallBack within a daypilot calendar control

Asked by Mike
14 years ago.
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
Comment posted by Dan Letecky
13 years ago.

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;
  }
}

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