RadTimePicker Clear Button

1 posts, 0 answers
  1. Joem
    Joem avatar
    11 posts
    Member since:
    Oct 2012

    Posted 15 Sep 2015 Link to this post

    I wanted to show a clear button to either clear the value or text of the control.


    The idea is the same as the clear button in 



    But I don't see any ClearButton from its child elements.


    I came up with the idea to rename the Close Button in


    and to add a clear action on its Click Event.


    I came up with this code:

    radTimePicker.TimePickerElement.PopupContentElement.FooterPanel.ButtonElement.Text = "Clear";
    (radTimePicker.TimePickerElement.PopupContentElement.FooterPanel.Children[0] as RadButtonElement).TextElement.Text = "Clear";
    (radTimePicker.TimePickerElement.PopupContentElement.FooterPanel.Children[0] as RadButtonElement).ToolTipText = "Clear";
    radTimePicker.TimePickerElement.PopupContentElement.FooterPanel.ButtonElement.Click +=
     delegate(object sender, EventArgs e) {  radTimePicker.Value = null;  };​


    The tooltiptext works as well as the clearing of value. with this, I know that I am using the right button element.

    But the Text always revert/return to "Close". 


    Am I forgetting something?



Back to Top