GridDateTimeColumn Icon not showing

2 posts, 0 answers
  1. Phil H.
    Phil H. avatar
    88 posts
    Member since:
    Nov 2008

    Posted 15 Sep Link to this post

    Hi:

     

    This not a question, but an answer.

    <Telerik:GridDateTimeColumn DataField="SampleTime" UniqueName="SampleTimeColumn" HeaderText="Time" HeaderStyle-Width="90px" ItemStyle-Width="86px" DataType="System.DateTime" PickerType="TimePicker">
    </Telerik:GridDateTimeColumn>

    The problem is the width of 90px does not allow for the full display of the date-time picker, so in code behind:

    WebControl _timeGridControl = _item["SampleTimeColumn"];
    if (_timeGridControl.Controls.Count > 0)
    {
        RadTimePicker _timeTextBox = (RadTimePicker)_timeGridControl.Controls[0];
        _timeTextBox.Width = new Unit("80px");
          _timeTextBox.DateInput.DisplayDateFormat = "HH:mm";
          _timeTextBox.DateInput.DateFormat = "HH:mm";
    }

    Phil

  2. Eyup
    Admin
    Eyup avatar
    3015 posts

    Posted 20 Sep Link to this post

    Hi Phil,

    Thank you for sharing your approach with your community. I hope it helps other developers as well.
    Generally, there is also the following property, which may prove helpful:
    <telerik:GridDateTimeColumn ... FilterControlWidth="70px">

    Regards,
    Eyup
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top