Buttons on monthly scheculer view

Is it possible to use a button inside a monthly scheduler view? I have tried adjusting the z-index, but it doesn't call the method I want to call. It just shows the view when the schedule is clicked.


3 Replies

RM Ruksar Moosa Sait Syncfusion Team September 29, 2022 06:39 AM UTC

Hi Marc,


We have checked on your query “Is it possible to use a button inside a monthly scheduler view?” and require additional details to further proceed on your requirement. So could you please get back to us with the below details that help us to check with your requirement and provide the solution earlier?


  • Do you want to render a button inside in the toolbar of the scheduler or inside the cell?
  • Share with us a screenshot or a video reference of your requirement.


Regards,

Ruksar Moosa Sait



MP Marc Perry September 29, 2022 05:04 PM UTC

The item is in the template for scheduleeventsettings.


<ScheduleEventSettings DataSource="@_dataSource" AllowEditing="true" AllowAdding="false" AllowDeleting="false" TValue="CalendarItem">

<Template>

<div>@((MarkupString)(context as CalendarItem)?.Subjection)</div>

</Template>

</ScheduleEventSettings>






RM Ruksar Moosa Sait Syncfusion Team September 30, 2022 06:49 AM UTC

Hi Marc,


We have checked on your requirement and have prepared a sample to render a html button with a click function in the Template tag and it works fine. Kindly try the attached sample and if we have misunderstood your requirement, then share us more details on your requirement to further proceed and provide the appropriate solution.


[Index.razor]

<ScheduleEventSettings DataSource="@Events" AllowEditing="true" AllowAdding="false" AllowDeleting="false" TValue="AppointmentData">

    <Template>

       <div><button type="button" @onclick="onclick">Click</button></div>

       <div>@((MarkupString)(context as AppointmentData)?.Subject)</div>

    </Template>

</ScheduleEventSettings>


public void onclick()

    {

        Console.WriteLine("Button clicked");

    }


Output:

A screenshot of a computer

Description automatically generated


Regards,

Ruksar Moosa Sait


Attachment: BlazorButtoninMonthcells_68718b2b.zip

Loader.
Up arrow icon