clearing RadSpineditor

3 posts, 1 answers
  1. Hengky
    Hengky avatar
    2 posts
    Member since:
    Mar 2017

    Posted 09 Mar Link to this post

    Hello all... 

    i have this code for clear radtextboxcontrol, how make this for radspineditor ? 

            Dim a, b As Control
            For Each a In TableLayoutPanel2.Controls
                If TypeOf a Is Telerik.WinControls.UI.RadTextBoxControl Then
                    a.Text = ""
                End If
            Next

            For Each b In TableLayoutPanel2.Controls
                If TypeOf b Is Telerik.WinControls.UI.RadSpinEditor Then
                    b.value = 0 <------ how make this happen 
                End If
            Next

     

    thanks... 

     

  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    1871 posts

    Posted 09 Mar Link to this post

    Hello Hengky,

    Thank you for writing.

    You need to cast the object to the appropriate type:
    Private Sub radButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
        For Each item As Control In tableLayoutPanel1.Controls
            If TypeOf item Is RadSpinEditor Then
                Dim spinEditor = CType(item, RadSpinEditor)
                spinEditor.Value = 0
            End If
        Next item
    End Sub

    I hope this will be useful. Let me know if you have additional questions.

    Regards,
    Dimitar
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Hengky
    Hengky avatar
    2 posts
    Member since:
    Mar 2017

    Posted 09 Mar in reply to Dimitar Link to this post

    Thanks Dimitar ... its work.
Back to Top