Hi,
I am D.Srinivasa
in my project i have a RadTreeView to display a data from DataBase. when i expand a Radtree view parent node then it checks the condition successfully. if the condition satisfies then i want to display a button in my page. but in my logic it check the condition successfully but it doesn't display the Button in the Page. Button default state is Visible =False.
The following is the code for RadNodeExpand()
Protected Sub RadTreeView1_NodeExpand(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles RadTreeView1.NodeExpand
PopulateNodeOnDemands(e, TreeNodeExpandMode.ServerSideCallBack)
End Sub
Protected Function PopulateNodeOnDemands(ByVal e As RadTreeNodeEventArgs, ByVal expandMode As TreeNodeExpandMode) As TreeNodeExpandMode
Dim data As DataTable = GetChildNode(e.Node.Value)
Dim message As String = ""
For Each row As DataRow In data.Rows
Dim node As New RadTreeNode()
node.Text = row("child_code").ToString()
node.Value = row("child_id").ToString()
'node.ExpandMode = expandMode
If row("job_status").ToString() = "NS" Then
Button.Visible=True
node.BackColor = Color.LightSkyBlue
message = message.ToString() + node.Text
MsgBox(message.ToString())
End If
e.Node.Nodes.Add(node)
Next
e.Node.Expanded = True
End Function
Please Help How can i display the Button Dynamically..
Thank You
D.Srinivas
I am D.Srinivasa
in my project i have a RadTreeView to display a data from DataBase. when i expand a Radtree view parent node then it checks the condition successfully. if the condition satisfies then i want to display a button in my page. but in my logic it check the condition successfully but it doesn't display the Button in the Page. Button default state is Visible =False.
The following is the code for RadNodeExpand()
Protected Sub RadTreeView1_NodeExpand(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles RadTreeView1.NodeExpand
PopulateNodeOnDemands(e, TreeNodeExpandMode.ServerSideCallBack)
End Sub
Protected Function PopulateNodeOnDemands(ByVal e As RadTreeNodeEventArgs, ByVal expandMode As TreeNodeExpandMode) As TreeNodeExpandMode
Dim data As DataTable = GetChildNode(e.Node.Value)
Dim message As String = ""
For Each row As DataRow In data.Rows
Dim node As New RadTreeNode()
node.Text = row("child_code").ToString()
node.Value = row("child_id").ToString()
'node.ExpandMode = expandMode
If row("job_status").ToString() = "NS" Then
Button.Visible=True
node.BackColor = Color.LightSkyBlue
message = message.ToString() + node.Text
MsgBox(message.ToString())
End If
e.Node.Nodes.Add(node)
Next
e.Node.Expanded = True
End Function
Please Help How can i display the Button Dynamically..
Thank You
D.Srinivas