Setting TimePicker to a null value in VB

4 posts, 0 answers
  1. Art
    Art avatar
    54 posts
    Member since:
    Dec 2010

    Posted 09 Sep 2015 Link to this post

    I'm not databinding, just trying to set the timepicker to null. I can set the nulltext property, but how to set the value to null?

    Later

    Art

  2. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 10 Sep 2015 Link to this post

    Hello Art,

    Thank you for writing.

    The following snippet shows how you can set the value to null:
    private void radButton1_Click(object sender, EventArgs e)
    {
        radTimePicker1.NullText = "Null";
        radTimePicker1.Value = null;
    }

    Let me know if you have additional questions.

    Regards,
    Dimitar
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Art
    Art avatar
    54 posts
    Member since:
    Dec 2010

    Posted 10 Sep 2015 in reply to Dimitar Link to this post

    That doesn't look like VB code to me. 

    radTimePicker1.Value = null doesn't work in VB.Net​

  5. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 10 Sep 2015 Link to this post

    Hello Art,

    I just noticed that you have specified the preferred language in the subject. The code in Visual Basic is similar:
    Private Sub radButton1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles radButton1.Click
         
        radTimePicker1.Value = Nothing
    End Sub

    I hope this will be useful.

    Regards,
    Dimitar
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top