hi
I am using radtreeview with the following properties and settings but when i click on node "onnodeclick" event dosnot work.
the second problem is that the + in right of node does not work at all(expand), and also when i debug it doesn't go to nodeclick event.
<telerik:RadTreeView ID="TreePicGroup" runat="server" DataFieldID="ID" DataFieldParentID="ParentID"
DataTextField="Title" CheckBoxes="true" OnNodeClick="TreePicGroup_NodeClick" OnNodeDrop="treeRole_NodeDrop"
EnableDragAndDrop="True" EnableEmbeddedSkins="True" Skin="Telerik"
dir="rtl" RegisterWithScriptManager="False" >
</telerik:RadTreeView>
-------------------------------------------------------------------------------------------------------------------------------------------------
C# Code
protected void TreePicGroup_NodeClick(object sender, RadTreeNodeEventArgs e)
{
pnlMSG.Visible = false;
pnlSetting.Visible = true;
lblSubMenu.Text = e.Node.Text;
if (e.Node.Text != "ريشه" && HidNewGroup.Value != "New")
{
DataTable dtGroup;
CMS_PictureGallary ObjPicGroup = new CMS_PictureGallary();
dtGroup = ObjPicGroup.GetGroup(Convert.ToInt32(cmbLibrary.SelectedValue), Convert.ToInt64(e.Node.Value));
txtTitle.Text = dtGroup.Rows[0]["Title"].ToString();
txtDes.Text = dtGroup.Rows[0]["Des"].ToString();
txtDate.Value = ShamsiDate.get(dtGroup.Rows[0]["Created"].ToString(), 1);
chkShowPic.Checked = Convert.ToBoolean(dtGroup.Rows[0]["PicPanel"]);
if (dtGroup.Rows[0]["Link"].ToString().StartsWith("?PageID"))
{
CboLink.SelectedValue = "1";
txtLinkID.Text = dtGroup.Rows[0]["Link"].ToString();
TrLink.Visible = true;
}
if (e.Node.ParentNode == null)
ChkReport.Enabled = false;
else
{
ChkReport.Enabled = true;
int Report = ObjPicGroup.Search_ReportGroup(Convert.ToInt32(cmbLibrary.SelectedValue), (dtGroup.Rows[0]["ParentID"]).ToString());
if (Convert.ToInt32(e.Node.Value) == Report)
ChkReport.Checked = true;
else
ChkReport.Checked = false;
}
//set Visible
cboDisplay.SelectedValue = Convert.ToInt32(dtGroup.Rows[0]["checked_out"]).ToString();
ImgPic.ImageUrl = "~/uploads/" + dtGroup.Rows[0]["BasesID"].ToString() + "/PictureGallary/Group/" + e.Node.Value.ToString() + ".jpg";
BtnReg.Text = "ويرايش";
pnlGroupName.Visible = true;
}
else
{
pnlGroupName.Visible = false;
if (HidNewGroup.Value == "New")
{
txtTitle.Text = "";
txtDate.Value = ShamsiDate.get(DateTime.Now.ToString(), 1);
}
else
pnlSetting.Visible = false;
}
}
----------------------------------
Thanks NeDa
I am using radtreeview with the following properties and settings but when i click on node "onnodeclick" event dosnot work.
the second problem is that the + in right of node does not work at all(expand), and also when i debug it doesn't go to nodeclick event.
<telerik:RadTreeView ID="TreePicGroup" runat="server" DataFieldID="ID" DataFieldParentID="ParentID"
DataTextField="Title" CheckBoxes="true" OnNodeClick="TreePicGroup_NodeClick" OnNodeDrop="treeRole_NodeDrop"
EnableDragAndDrop="True" EnableEmbeddedSkins="True" Skin="Telerik"
dir="rtl" RegisterWithScriptManager="False" >
</telerik:RadTreeView>
-------------------------------------------------------------------------------------------------------------------------------------------------
C# Code
protected void TreePicGroup_NodeClick(object sender, RadTreeNodeEventArgs e)
{
pnlMSG.Visible = false;
pnlSetting.Visible = true;
lblSubMenu.Text = e.Node.Text;
if (e.Node.Text != "ريشه" && HidNewGroup.Value != "New")
{
DataTable dtGroup;
CMS_PictureGallary ObjPicGroup = new CMS_PictureGallary();
dtGroup = ObjPicGroup.GetGroup(Convert.ToInt32(cmbLibrary.SelectedValue), Convert.ToInt64(e.Node.Value));
txtTitle.Text = dtGroup.Rows[0]["Title"].ToString();
txtDes.Text = dtGroup.Rows[0]["Des"].ToString();
txtDate.Value = ShamsiDate.get(dtGroup.Rows[0]["Created"].ToString(), 1);
chkShowPic.Checked = Convert.ToBoolean(dtGroup.Rows[0]["PicPanel"]);
if (dtGroup.Rows[0]["Link"].ToString().StartsWith("?PageID"))
{
CboLink.SelectedValue = "1";
txtLinkID.Text = dtGroup.Rows[0]["Link"].ToString();
TrLink.Visible = true;
}
if (e.Node.ParentNode == null)
ChkReport.Enabled = false;
else
{
ChkReport.Enabled = true;
int Report = ObjPicGroup.Search_ReportGroup(Convert.ToInt32(cmbLibrary.SelectedValue), (dtGroup.Rows[0]["ParentID"]).ToString());
if (Convert.ToInt32(e.Node.Value) == Report)
ChkReport.Checked = true;
else
ChkReport.Checked = false;
}
//set Visible
cboDisplay.SelectedValue = Convert.ToInt32(dtGroup.Rows[0]["checked_out"]).ToString();
ImgPic.ImageUrl = "~/uploads/" + dtGroup.Rows[0]["BasesID"].ToString() + "/PictureGallary/Group/" + e.Node.Value.ToString() + ".jpg";
BtnReg.Text = "ويرايش";
pnlGroupName.Visible = true;
}
else
{
pnlGroupName.Visible = false;
if (HidNewGroup.Value == "New")
{
txtTitle.Text = "";
txtDate.Value = ShamsiDate.get(DateTime.Now.ToString(), 1);
}
else
pnlSetting.Visible = false;
}
}
----------------------------------
Thanks NeDa