abbreviations of days names in navigation calendar

hi,
how can I customize abbreviations of days names in navigation calendar ?
In my culture (pl-PL) these abbreviations are PO, WT... for Monday, Tuesday... respectively.
Is there a way to change these abbreviations without changing culture settings of operating system ?
I would like to change one to P, W...

The reason for which I need to change short names of days is problem with displaying current abbreviations.
Currently they are looks like that:



I would like to remove those short lines which looks like underscores of W, Ś and S.

please help.
best regards.
Adam


5 Replies

MG Mohanraj Gunasekaran Syncfusion Team July 26, 2018 12:54 PM UTC

Hi Adam,  
  
Thanks for using Syncfusion product.  
  
In order to customize the day names in navigation calendar, you can use the QueryCellInfo event forCalendarGrid. The Syncfusion.Grid.Windows library should be added as reference in your project. Please refer to the below code example,  
  
Code example  
this.scheduleControl1.Calendar.CalenderGrid.QueryCellInfo += CalenderGrid_QueryCellInfo;  
  
private void CalenderGrid_QueryCellInfo(object sender, Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventArgs e)  
{  
    if (e.RowIndex == 1)  
    {  
        if (e.ColIndex == 1)  
            e.Style.CellValue = "PO";  
        else if (e.ColIndex == 2)  
            e.Style.CellValue = "W";  
        else if (e.ColIndex == 3)  
            e.Style.CellValue = "S";  
        else if (e.ColIndex == 4)  
            e.Style.CellValue = "CZ";  
        else if (e.ColIndex == 5)  
            e.Style.CellValue = "PT";  
        else if (e.ColIndex == 6)  
            e.Style.CellValue = "S";  
        else if (e.ColIndex == 7)  
            e.Style.CellValue = "NI";  
    }  
}  
  
Sample link: ScheduleControl  

Screenshot  
   
  
Regards,  
Mohanraj G  
 



AM amsm July 26, 2018 01:00 PM UTC

hi,
this is what I needed, thank You very much for help.
best regards,
Adam


MG Mohanraj Gunasekaran Syncfusion Team July 27, 2018 04:20 AM UTC

Hi Adam, 

Thanks for your update. 

We are glad to know that your reported problem has resolved. 

Please let us know if you have any concerns. 

Regards, 
Mohanraj G 



AM amsm July 27, 2018 03:59 PM UTC

There is one more thing to do for the solution to be complete.
Above piece of code should be called not only when current row index is equal to 1 (e.RowIndex == 1), but also for every eighth row starting from index 1.
Otherwise, only top most calendar in navigation panel will be displayed correctly while others calendars below still will be incorrect.


MG Mohanraj Gunasekaran Syncfusion Team July 30, 2018 12:57 PM UTC

Hi Adam, 
  
Thanks for your update. 
  
Yes. You were right. if you want to change the all visible calendar of the left panel in schedule control, you should use that row index in QueryCellStyleInfo event. For example, if you have two calendar in navigation panel, you could use the below code to change the name of the day, 
  
Code  
this.scheduleControl1.Calendar.CalenderGrid.QueryCellInfo += CalenderGrid_QueryCellInfo; 
  
private void CalenderGrid_QueryCellInfo(object sender, Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventArgs e) 
{ 
    if(e.RowIndex == 1 || e.RowIndex == 9) 
    { 
        if (e.ColIndex == 1) 
            e.Style.CellValue = "PO"; 
        else if (e.ColIndex == 2) 
            e.Style.CellValue = "W"; 
        else if (e.ColIndex == 3) 
            e.Style.CellValue = "S"; 
        else if (e.ColIndex == 4) 
            e.Style.CellValue = "CZ"; 
        else if (e.ColIndex == 5) 
            e.Style.CellValue = "PT"; 
        else if (e.ColIndex == 6) 
            e.Style.CellValue = "S"; 
        else if (e.ColIndex == 7) 
            e.Style.CellValue = "NI"; 
    } 
} 
  
Sample link: ScheduleControl 
  
Regards, 
Mohanraj G 
 


Loader.
Up arrow icon