C1Schedule - Need Some Direction

Posted by: mwebster on 12 July 2019, 1:34 am EST

    • Post Options:
    • Link

    Posted 12 July 2019, 1:34 am EST

    I am working on an winforms app (vb.net) and I need some assistance with the C1Schedule control. I have a table of “Sales Activities” that I need to show on a calendar. Each of these schedules has a due date, some notes, an ID field identifying which sales deal they belong to, and I field showing which sales rep they belong to and an ID field for the type of activity. What I need to be able to do is:

    1. Bind to the database in code at runtime. My data source is a data table object. I also need to be able to specify the field mappings at runtime.
    2. I need to hide or disable the “Private”, “Resources”, “Contacts” and “Resources” fields on the add/edit appointment form.
    3. I need to be able to allow the user to specify an activity type (from a drop down list) on the add/edit appointment form.
    4. When a user inserts an appointment, I need it to get the UserID of the owner from a drop down list on the parent form.

    The only tutorial I can find covers only the rudimentary basics and doe snot cover any of the above. I may need to create my own Add/Edit appointment form which I don’t mind but the need to bind to the data in code at runtime is going to be paramount. If I go that route, I will need to disable the add/edit capabilities in the control itself. Do you have any suggestions for me?

    Thanks,

    Mike

  • Posted 12 July 2019, 4:05 am EST

    Ok I managed to work out the above but now I need to know how to determine which appointment (if any) the user has selected and get the ID field value for that selected appointment. Any suggestions for me?

    Thanks,

    Mike

  • Posted 12 July 2019, 5:09 am EST

    Just to add, I am using this code to get the currently selected appointment:

    Dim AptList As C1.C1Schedule.AppointmentList = C1Schedule1.SelectedAppointments

    but when I look at the available properties of AptList(0), I can get some of the field values but not the ID/Index value that contains the recordID from the database. that us the field that I critically need.

    I am using this code when setting up the schedule to assign the record ID to the Index field:

    C1Schedule1.DataStorage.AppointmentStorage.Mappings.IndexMapping.MappingName = “DealActivityID”

    I noticed that there is a “tag” value that I can get but I evidently can’t assign a field mapping to the “tag” value to begin with.

  • Posted 14 July 2019, 11:42 pm EST

    Hello,

    You can use the following line of code to get the index.

    Appointments[0].Key[0].ToString()
    

    Note: Please set Id mapping to “None” other wise it returns the GUID.

    Thanks.

  • Posted 15 July 2019, 4:16 am EST

    Thanks!

    Mike

Need extra support?

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

Learn More

Forum Channels