Hi guys.I am creating tree view from some of my class object dynamically.
What i need to do is drag(just drag not remove) the leaf node into the rich text editor text.
I have tried to create the nodetemplate but not succcessful( other wise just add the node template in the leaf node with label)
Following is the code of making the treeview node.
TreeView1.Nodes.Clear();
DocumentTemaplateCompiledDto obj = DocumentTemaplateCompiledBll.GetInstance.GetDocumentTemaplateCompiledByTemplateId(Int32.Parse(ddlTemplates.SelectedValue));
Please suggest me how can i achieve my desired reuslt.
Any help guys?
What i need to do is drag(just drag not remove) the leaf node into the rich text editor text.
I have tried to create the nodetemplate but not succcessful( other wise just add the node template in the leaf node with label)
Following is the code of making the treeview node.
TreeView1.Nodes.Clear();
DocumentTemaplateCompiledDto obj = DocumentTemaplateCompiledBll.GetInstance.GetDocumentTemaplateCompiledByTemplateId(Int32.Parse(ddlTemplates.SelectedValue));
if
(obj.LstSections !=
null
&& obj.LstSections.Count > 0)
{
foreach
(var objSection
in
obj.LstSections)
{
var tNode =
new
RadTreeNode(objSection.SectionName);
if
(obj.LstSimpleFields !=
null
&& obj.LstSimpleFields.Any(h => h.FkDocumentTemplateSectionId == objSection.DocumentTemplateSectionId))
{
var tNodeChildSimpleFields =
new
RadTreeNode(
"Simple_fields_Control"
);
foreach
(var objSimplefield
in
obj.LstSimpleFields.FindAll(h => h.FkDocumentTemplateSectionId == objSection.DocumentTemplateSectionId))
{
var tNodeChildGridTextEntry =
new
RadTreeNode(objSimplefield.FieldName);
tNodeChildGridTextEntry.Nodes.Add(
new
RadTreeNode
{
Text = objSimplefield.FieldCode,//these are the leaf node
AllowEdit =
true
,
//this I have done as a last possible option
AllowDrop =
true
,
//this I have done as a last possible option
AllowDrag =
true
//this I have done as a last possible option
});
tNodeChildSimpleFields.Nodes.Add(tNodeChildGridTextEntry);
}
tNode.Nodes.Add(tNodeChildSimpleFields);
}
TreeView1.Nodes.Add(tNode);
}
}
<
telerik:RadEditor
ContentAreaMode
=
"Div"
runat
=
"server"
ID
=
"RadEditor1"
Height
=
"515"
Width
=
"700"
Visible
=
"True"
>
</
telerik:RadEditor
>
Please suggest me how can i achieve my desired reuslt.
Any help guys?