GridDateTimeColumn : how to set de FirstDayOfWeek

1 posts, 0 answers
  1. Louis
    Louis avatar
    4 posts
    Member since:
    Aug 2013

    Posted 12 May Link to this post

    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

Back to Top