How to change Blazor Scheduler editor template header

Thread 151529 shows how to achieve this in Angular JS but how to do it in Blazor?

I've tried various things in the Editor Template and OnPopOpen but all fail.

I want to change the default editor headings of 'New Event' and 'Edit Event' to show my text instead.  Is this possible?  Can anyone tell me how without using JS?

5 Replies

NR Nevitha Ravi Syncfusion Team December 9, 2020 10:32 AM UTC

Hi Ian, 

Greetings from Syncfusion Support. 

We have achieved your requirement by customizing the specific word in the localized words of Scheduler. You can change the localized words of the scheduler in the resx file of your culture available in the following directory Project root folder > Resources > SfResources-en-US.resx like the below image.  

 

Please refer to the following steps to add localization in your application. 

Regards, 
Nevitha 



IA Ian December 9, 2020 09:13 PM UTC

This is great.  I have managed to understand your solution enough to make mine work as I want.
Even though I had looked at your Localization web page, I doubt very much I would have made my solution work.
I feel your solution may be useful for other types of project in the future.
Your reply was really most helpful.  Thank you very much indeed.
Ian


NR Nevitha Ravi Syncfusion Team December 10, 2020 06:17 AM UTC

Hi Ian, 

You are most welcome, we are glad that our provided solution helped you to meet your requirement. Please get back to us if you need any further assistance. 

Regards, 
Nevitha 



NS Naunihal Sidhu July 23, 2022 05:01 PM UTC

I have the similar need, but I need to display different set of fields if editor opens for New Event and different set of fields if Editor is opened for modification.

How can I determine that programmatically?



RM Ruksar Moosa Sait Syncfusion Team July 25, 2022 11:18 AM UTC

Hi Naunihal,


We have checked on your query and let you know that you can display different set of fields when the Editor is opened for New Event and for Modifications with the by like the below condition.


[Index.razor]

<EditorTemplate>

                <div>

                    <input type="hidden" name="Id" class="e-field" value="@((context as AppointmentData).Id)" />

                    @if ((context as AppointmentData).Id == default(int))  //To check if the appointment is already rendered

                    {

                        <table class="custom-event-editor" width="100%" cellpadding="5">

                            <tbody>

                                <tr>

                                    <td class="e-textlabel">Summary</td>

                                    <td colspan="4">

                                        <SfTextBox @bind-Value="@((context as AppointmentData).Subject)"></SfTextBox>

                                    </td>

                                </tr>

                                <tr>

                                    <td class="e-textlabel">From</td>

                                    <td colspan="4">

                                        <SfDateTimePicker @bind-Value="@((context as AppointmentData).StartTime)">

                                        </SfDateTimePicker>

                                    </td>

                                </tr>

                                <tr>

                                    <td class="e-textlabel">To</td>

                                    <td colspan="4">

                                        <SfDateTimePicker @bind-Value="@((context as AppointmentData).EndTime)">

                                        </SfDateTimePicker>

                                    </td>

                                </tr>

                                <tr>

                                    <td class="e-textlabel">Reason</td>

                                    <td colspan="4">

                                        <SfTextBox Multiline="true" @bind-Value="@((context as AppointmentData).Description)">

                                        </SfTextBox>

                                    </td>

                                </tr>

                            </tbody>

                        </table>

                    }

                    else

                    {

                        <table class="custom-event-editor" width="100%" cellpadding="5">

                            <tbody>

                                <tr>

                                    <td class="e-textlabel">From</td>

                                    <td colspan="4">

                                        <SfDateTimePicker @bind-Value="@((context as AppointmentData).StartTime)"></SfDateTimePicker>

                                    </td>

                                </tr>

                                <tr>

                                    <td class="e-textlabel">To</td>

                                    <td colspan="4">

                                        <SfDateTimePicker @bind-Value="@((context as AppointmentData).EndTime)"></SfDateTimePicker>

                                    </td>

                                </tr>

                            </tbody>

                        </table>

                    }

                </div>

</EditorTemplate>


Kindly try the attached sample and let us know if this meets your requirement.


Regards,

Ruksar Moosa Sait


Attachment: BLAZORDifferent_fields_for_cell_and_event_in_EditorTemplate_d638bbd9.zip

Loader.
Up arrow icon