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

GridDateTimeColumn : how to set de FirstDayOfWeek

0 Answers 165 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Louis
Top achievements
Rank 2
Louis asked on 12 May 2017, 06:53 PM

Hello everyone,

I am using a radgrid with a GridDateTimeColumn, I want to set the FirstDayOfWeek for the calendar from code behind.

Here is my column :

<telerik:GridDateTimeColumn DataField="DateDebut" HeaderText="Du" SortExpression="Du" MaxLength="50"                                  UniqueName="DateDebut" ItemStyle-Width="80px" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:yyyy-MM-dd}" />

Here is my code behind :

protected void rgDateSaisie_ItemDataBound(object sender, GridItemEventArgs e)         {    

         if (e.Item is GridEditableItem && e.Item.IsInEditMode)             

{

                GridEditableItem editedItem = e.Item as GridEditableItem;

                GridEditManager editMan = editedItem.EditManager;

                GridDateTimeColumnEditor editor = (GridDateTimeColumnEditor)(editMan.GetColumnEditor("DateDebut"));                 RadDatePicker picker = editor.PickerControl;

                picker.DatePopupButton.ToolTip = "Ouvrir le calendrier";  

               picker.Calendar.FirstDayOfWeek = FirstDayOfWeek.Friday;

}

The toolTip message works but firstDayOfTheWeek is still sunday in the popup calendar.

What I am missing.

Thanks a lot

No answers yet. Maybe you can help?

Tags
Calendar
Asked by
Louis
Top achievements
Rank 2
Share this question
or