Hi there,
i want to add some Control fields to my RadGroupBox.
The Admin can change the fields in a form which a regular user can see.
These fields are saved in a database.
So i added a empty RadGroupBox to my control with the following changed settings:
AutoSize = True
Visible = False
I found an example in the forum but that didn't work for me:
Using dataContext = New DataContext()
Dim fields = dataContext.tblDynamicFields.Where(Function(x) x.PageID = 1 And x.Active = True)
If fields.Count > 0 Then
Me.DynamicFieldGroupBox.Visible = True
Else
Return
End If
For Each field In fields
Dim label = New RadLabel
label.Text = field.Name
Me.DynamicFieldGroupBox.Controls.Add(label)
Me.DynamicFieldGroupBox.Controls.Add(New RadTextBox)
Next
End Using
I currently have 3 Fields in my table, and they are all loaded from the datacontext.
The visibility is fine. The GroupBox is shown, but the Elements i have added are all stacked together. I have attached a picture showing my problem
Thanks a lot
i want to add some Control fields to my RadGroupBox.
The Admin can change the fields in a form which a regular user can see.
These fields are saved in a database.
So i added a empty RadGroupBox to my control with the following changed settings:
AutoSize = True
Visible = False
I found an example in the forum but that didn't work for me:
Using dataContext = New DataContext()
Dim fields = dataContext.tblDynamicFields.Where(Function(x) x.PageID = 1 And x.Active = True)
If fields.Count > 0 Then
Me.DynamicFieldGroupBox.Visible = True
Else
Return
End If
For Each field In fields
Dim label = New RadLabel
label.Text = field.Name
Me.DynamicFieldGroupBox.Controls.Add(label)
Me.DynamicFieldGroupBox.Controls.Add(New RadTextBox)
Next
End Using
I currently have 3 Fields in my table, and they are all loaded from the datacontext.
The visibility is fine. The GroupBox is shown, but the Elements i have added are all stacked together. I have attached a picture showing my problem
Thanks a lot