I have change the script as per below based on your suggestion. The DataGrid does displays the row of data but it's without the CheckBox.
Not sure why it's not working.
Please Help. Thanks
I did have a look at the URL site with VB format script and compared it with my C# format script. Logically it looks very similiar. The VB script end result shows the DataGrid with CheckBox but not my version. I am very puzzled.
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...