Hello,
I have a little problem with Radtreeview and a hide linkbutton. When i click on a node with the event "OnClientNodeClicked", the js execute a function that show the linkbutton, but after couple of second the linkbutton disapear or return to his start states (hide).
Have you a solution to this problem.
Thanks a lot
My client code:
Aspx:
<asp:LinkButton runat="server" ID="lkbAdd" OnClientClick="OnClientClickAdd()"><img src="Images/Add-24.png" alt="Add" title="Add node"/></asp:LinkButton>
<telerik:RadTreeView ID="RadTreeView2" runat="server" Width="400px" Height="400px" OnNodeClick="RadTreeView2_NodeClick" OnNodeDataBound="RadTreeView2_NodeDataBound" BorderColor="Black" BorderWidth="1" OnClientNodeClicked="OnClientNodeClicked">
<DataBindings>
<telerik:RadTreeNodeBinding Expanded="True"></telerik:RadTreeNodeBinding>
</DataBindings>
</telerik:RadTreeView>
JS:
function OnClientNodeClicked(sender, eventArgs)
{
var listItem = document.getElementById('<%= lkbAdd.ClientID %>');
var node = eventArgs.get_node();
var nodeValue = node.get_value();
node.select();
if(nodeValue > 9990000000)
{
listItem.style.display = "inline-block";
}
else
{
listItem.style.display = "none";
}
args.set_cancel(true);
}
My Server Code:
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
//....
lkbAdd.Style.Add("display", "none");
}
}