I have the following treeview
<telerik:RadTreeView ID="tvProcInst" runat="server" CheckBoxes="True" CausesValidation="False" DataTextField="LEVEL_NAME" DataValueField="LEVEL_CODE" RenderMode="Lightweight" CssClass="Left" MultipleSelect="True"></telerik:RadTreeView>
that is loaded from a linq query once in the page load. That all works fine. Each time a user checks a node I add a combobox with the following code
Private Sub tvProcInst_NodeCheck(sender As Object, e As RadTreeNodeEventArgs) Handles tvProcInst.NodeCheck Dim cb As New RadComboBox Dim cn As New RadTreeNode If e.Node.ParentNode IsNot Nothing Then Return End If If e.Node.HasControls Then If Not e.Node.Checked Then e.Node.Controls.Clear() End If Return End If Dim row As New RadComboBoxItem row.Value = "R" row.Text = "Recurring" cb.Items.Add(row) row = New RadComboBoxItem row.Value = "N" row.Text = "Non-Recurring" cb.Items.Add(row) cb.ID = "cb" & e.Node.Value cn.Controls.Add(cb) cn.Checkable = False e.Node.Nodes.Add(cn) e.Node.Expanded = TrueEnd Sub
it will add the combobox no problem, but will not clear it upon unchecking the checkbox, and when checking another checkbox it will create the new one, but the previously created combobox goes away or goes invisible I can't figure out which because the controls.count is still 1 but yet I can't see it.
Hopefully this makes sense. If screen shots will help I can supply them if needed.
