Drag Items From ListBox To C1Calendar

Posted by: mwebster on 27 January 2020, 3:12 am EST

    • Post Options:
    • Link

    Posted 27 January 2020, 3:12 am EST

    Hello, I am looking for some advice on how I can allow a user to click an item in a standard list box, drag it onto a particular date in a C1Calendar control and have it create a schedule for that item on that date. The items in the list box have ID values and the schedule item created will need to include that ID value.

    An example of what I am doing, ListBox1 has a list of Names. If A user drags John Doe (ID of 12) onto January 27th, I want to create an appointment on January 12 for UserID 12.

    Thanks,

    Mike

  • Posted 27 January 2020, 5:18 am EST

    Forgot to mention, working in VB.NET and its a Windows Forms application.

  • Posted 27 January 2020, 10:18 pm EST

    Hi,

    Mike, apologies but this is not supported. The run time operation supported are https://www.grapecity.com/componentone/docs/win/online-schedule/draganddropsupport.html

    ~Ruchir

  • Posted 28 January 2020, 7:30 am EST

    Ok thanks, I came up with a workaround for that.

  • Posted 28 January 2020, 7:35 am EST

    One quick related question…when a user drags and appointment from one day to the other, how do I update the underlying data set with the new date? Thanks,

    Mike

  • Posted 28 January 2020, 10:14 pm EST

    Hi Mike,

    When you drag drop an appointment, the AppointmentChanged event will fire. Inside this event handler you can save the update. In the following code, we are updating the database value through an OleDbDataAdapter.```

    private void C1Schedule1_AppointmentChanged(object sender, AppointmentEventArgs e)

    {

    this.appointmentsTableAdapter1.Update(c1NWindDataSet1.Appointments);

    c1Schedule1.Refresh();

    }

    Thanks,
    Ruchir
  • Posted 28 January 2020, 11:20 pm EST

    Thanks, I will give it a try.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels