We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Remove ou change text when selected day without appointments

Hi.

I need change the text or remove label when I select one day without appointments. The default from SfShedule is No Events. I need change this.

I tried:

 <schedule:SfSchedule.InlineView>
                <Label BackgroundColor="Red" Text="No Events" TextColor="White"/>
            </schedule:SfSchedule.InlineView>

But the component create labels when I selected days with appointments not days without appointments

Tks a lot. 

3 Replies

KA Karthikraja Arumugam Syncfusion Team January 3, 2020 06:39 AM UTC

Hi Henrique, 
 
Thank you for contacting Syncfusion support. 
 
We have checked your requirement of  ”Change or remove No Events text in InlineView” and you can hide the text by setting TimeTextColor property of MonthInlineViewStyle to Transparent in OnMonthInlineLoadedEvent. 
 
Please refer the following code example for the same, 
 
[C#] 
schedule.OnMonthInlineLoadedEvent += Schedule_OnMonthInlineLoadedEvent; 
 
private void Schedule_OnMonthInlineLoadedEvent(object sender, MonthInlineLoadedEventArgs e) 
{ 
            var appointments = e.appointments.Cast<ScheduleAppointment>().ToList(); 
            MonthInlineViewStyle monthInlineViewStyle = new MonthInlineViewStyle(); 
            if (appointments == null || appointments.Count <= 0) 
            { 
                monthInlineViewStyle.TimeTextColor = Color.Transparent; 
            } 
            e.monthInlineViewStyle = monthInlineViewStyle; 
 } 
 
 
We have prepared a sample for your requirement, 
 
Please refer our UG documentation to know more about customizing InlineView, 
 
We hope this helps. Please let us know if you would require any further assistance. 
 
Regards, 
Karthik Raja A


HE Henrique January 3, 2020 12:49 PM UTC

Nice! Tks a lot!


KA Karthikraja Arumugam Syncfusion Team January 3, 2020 01:01 PM UTC

Hi Henrique, 
 
Thank you for the update. 
 
Please get in touch with us if you would require further assistance. 
 
Regards, 
Karthik Raja A 


Loader.
Live Chat Icon For mobile
Up arrow icon