This is a migrated thread and some comments may be shown as answers.

Changing the text on the Navigation Header Scheduler MVC telerik

11 Answers 176 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
K.Ramadan
Top achievements
Rank 2
Veteran
K.Ramadan asked on 19 Mar 2020, 03:14 PM
Hi, everyone,
I'm trying to change the text of ( Today, Day, TimeLine, TimeLineWeek, Month, Agenda, . . . . ).

Thanks in Advance
I'll drop a picture here to be more specific about what I want to know.

11 Answers, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 23 Mar 2020, 08:01 AM

Hi,

As per the titles of the views, those could be configured within the Views() configuration of the Scheduler:

.Views(views =>
{
	views.DayView(d => d.Title("Changed"));
...

The Today text, on the other hand, should be altered in the Messages() configuration of the widget:

.Messages(m => m.Today("Custom today"))

Regards,
Veselin Tsvetanov
Progress Telerik

Get quickly onboarded and successful with your Telerik UI for ASP.NET MVC with the dedicated Virtual Classroom technical training, available to all active customers.
0
K.Ramadan
Top achievements
Rank 2
Veteran
answered on 23 Mar 2020, 08:21 AM

Hi,

you are a goldmine my friend .. your post was clear as the sun ..

Now I'm trying to change the (All Events, Date, Time, Event ) .. but there is no option for these !

Thanks in Advance Veselin

0
K.Ramadan
Top achievements
Rank 2
Veteran
answered on 23 Mar 2020, 01:53 PM

This is an Interface with default text values.

i would like to change these default values also.

>>>> like the Header Title " Event "

>>>> or ( Title, Start. End . . . . ).

I tried every thnig but with no result .. i can't find any method that helps me change these Values . . .

Tnaks in Advance

0
Veselin Tsvetanov
Telerik team
answered on 25 Mar 2020, 08:35 AM

Hello Lu,

As per the Agenda view messages, those could be defined using the Messages configuration of the Scheduler:

.Messages(m => m
	.Today("Custom today")
	.Date("Custom date")
	.Event("Custom event")
	.Time("Custom time")
)

Concerning the "All events" text on the Timeline and the "Events" text on the editor, those could not be configured with the Messages option. Therefore, you will need to alter the content of the respective DOM element ("<div class="k-scheduler-times"><table class="k-scheduler-table" ><tbody><tr><th>All events</th></tr></tbody></table></div>" and .k-window-title). For the All events text you could do that in the DataBound event of the Scheduler, while for the Event text on the edit pop-up you could handle the Edit event:

function onEdit(e) {
  e.container.closest('.k-window').find('.k-window-title').text("changed")
}

Regards,
Veselin Tsvetanov
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
K.Ramadan
Top achievements
Rank 2
Veteran
answered on 30 Mar 2020, 09:18 AM
Can you Please show me an example for changing the Text on the edit pop-up,because i tried your example but no results .. nothings changes when i  do this ..so please if you can just give me a lil Example .. i'll be thankfull .. Thanks in Advance
0
K.Ramadan
Top achievements
Rank 2
Veteran
answered on 30 Mar 2020, 09:32 AM

PS : i don't just mean the Event Text on the edit pop-up but all labels on the edit pop-up ..

Thanks in Advance . . .

0
K.Ramadan
Top achievements
Rank 2
Veteran
answered on 31 Mar 2020, 06:55 AM
I was going into this not knowing a lot about .closest(), but now I know how to do it. Thank you for your Help.
I did that part, changing every text on the edit pop-up, but now I' stuck with the "all events" Text!
it will be a great support if you help me figure out how to change the "all events" text .. I tried my best . . . Thanks in Advance
0
Veselin Tsvetanov
Telerik team
answered on 31 Mar 2020, 11:30 AM

Hello Lu,

Here is an example of how to alter the All events text on the Timeline view with a dataBound event handler:

function onDataBound(e) {
  var scheduler = e.sender;
  var schedulerElement = scheduler.element;

  if(scheduler.view().name === "timeline") {
  	schedulerElement.find('.k-scheduler-times th').last().text('Changed');
  }
}

Her you will find a Dojo sample on the above:

https://dojo.telerik.com/iToDAmUp/10

Regards,
Veselin Tsvetanov
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
K.Ramadan
Top achievements
Rank 2
Veteran
answered on 01 Apr 2020, 07:09 AM
YOU ARE A LEGEND MY FRIEND .. THANKS ..
0
K.Ramadan
Top achievements
Rank 2
Veteran
answered on 02 Apr 2020, 11:44 AM

Hello again,

Now i changed all the labels on edit pop-up but the default value of the dropLists "None"..

I tried this :

function Edit_Scheduler(){
var raumText = $(".k-window").find('div[data-container-for= Raum]').find('span[class = k-input]').text();
 if (raumText == "None") {
$(".k-window").find('div[data-container-for= Raum]').find('span[class = k-input]').text("select");
var raumSpan = $(".k-window").find('div[data-container-for= Raum]').find('span[class = k-input]');
              
 $(raumSpan).on('click', function (event) {
                    //alert(this.value);
  $(".k-window").find('div[data-container-for= Raum]').find('span[class = k-input]').text("select");
 console.log("onClick");
                })

}

That's do change the "None" to "select" but after i click on it, it shows all select options with a None value at the top and after the list is dropped down if i click on the span it shows "select" because of the  onClick() that i wrote .. but if i click on anywhere else that span, it will shows "None" again  

0
Veselin Tsvetanov
Telerik team
answered on 06 Apr 2020, 08:52 AM

Hello Lu,

If you need to change the option label of the resource DropDownList on the editor pop-up, you could do that by handling the edit event of the widget in the following manner:

function onEdit(e) {
  var container = e.container;
  var dropDownElement = container.find('[data-bind="value:Raum]');
  var dropDown = dropDownElement.getKendoDropDownList();
  
  dropDown.setOptions({
  	optionLabel: "Test"
  });
},

Regards,
Veselin Tsvetanov
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Scheduler
Asked by
K.Ramadan
Top achievements
Rank 2
Veteran
Answers by
Veselin Tsvetanov
Telerik team
K.Ramadan
Top achievements
Rank 2
Veteran
Share this question
or