Currently, I am building an Catalog Application where User can search, edit, add and delete Product_ID on a same form.
I am using Split Container (Vertical) to section out form's controls.
Panel1 (Top) contains Header of the Form, searchbar (plan - not constructed yet).
Panel2 (Bottom) has 1 DataGridView (Dock: Left) which display all Product_Item and connected to SQL Database.Also, 8 textboxes and label. Hence, whenever User clicked any row at DataGridView, extra data will be shown in the textboxes.
Question,
I would like a Loop to auto Disabled/Enabled these textboxes on form_load and a button_click.
I had tried:-
Expand|Select|Wrap|Line Numbers
- Dim ctl As Control
- For Each ctl In Me.Panel2.Controls
- If TypeOf ctl Is TextBox Then
- ctl.Enabled = False
- End If
- Next