none
how to Validate Multiple TextBoxes , combo box and datetime picker infragistics RRS feed

  • Question

  • For Each ctl As Control In Controls If TypeOf ctl Is Infragistics.Win.UltraWinEditors.UltraTextEditor AndAlso ctl.Text = "" Then                     ctl.Focus()  MsgBox(ctl.Name)  End If .  Here I need to get all infragistics controls. Or else suggest me to validate all the infragistics controls such as textbox, date time picker, combo. I don't want solution for a single control, I am having nearly hundreads of textboxes.
    Friday, December 29, 2017 7:43 AM

All replies

  • Yea but this is really an Infagistics questions which should be available by them. 

    https://www.infragistics.com/community/forums

    Here in this forum it can be seen as spam, because it is not is not real a VB question.

    For Windows Forms there is a special Microsoft forum. But that does also not fit for your kind of question.


    Success Cor

    Friday, December 29, 2017 8:50 AM
  • You know you can do this with Linq using a lambda expression, right?

    Public Class Form1
        Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
            Dim tbxname As String
            Dim emptyTextBoxes = (Controls.OfType(Of TextBox).Where(Function(t) t.Text = "")).ToList()
    
            For Each tbx As TextBox In emptyTextBoxes
                tbxname = tbx.Name
            Next
        End Sub
    End Class
    

    Friday, December 29, 2017 9:13 AM
  • Thanks for the suggestion.

    Using own ,Microsoft product getting my solution thanks.

    Friday, December 29, 2017 9:17 AM
  • Hello,

    I've never used this library but the first thing comes to mind is to search their site for a validation component and sure enough there is one.

    https://www.infragistics.com/help/winforms/winvalidator-about-winvalidator

    Best to use their forums as Cor suggested if you have issues working with this validator.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Friday, December 29, 2017 10:12 AM