I know this has probably already been brought up before, but I am having some strong difficulties using Atlas UpdatePanel's with ComponentArt's treeView control.
I created a tree view, and applied autopostback properties to true. I then added a script manager tag and an update panel around the tree view. My intention was for the treeview to run the postback scripts (in C#) when it autoposted back, but without reloading the page. Hence the Atlas updatePanel. Instead the tree view control isn't posting back, and is having some serious issues with it.
I also have been looking EVERYWHERE for more information on how component art supports atlas, and what atlas controls you can use with component art controls, but still haven't found anything.
If anyone knows any resources I might look at, or has any ideas on how update panel's will work with component art controls (primarily the treeView) please let me know.
Thanks! (I will update some code to give an example of this difficulty as soon as I can.)
Hi There,
I was trying to get the update panel working with the component art tree view last night...
The example I was trying to create used AutoPostBackOnNodeSelect and simply updated a label on screen with the value of the selected node. I have this just about working, but the tree view seems to lose all styling after one node select...
So I don't know whether this code will help you or not.
The strategy was to surround the control I was trying to update with the Update Panel (ie the label), rather than the tree and setting a control trigger for the NodeSelected event of the tree. This updates the page without a postback, but has the issue with tree styling that I mentioned before.
Anyways, here is the code...
1<%@. Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>23<%@. Register Assembly="ComponentArt.Web.UI" Namespace="ComponentArt.Web.UI" TagPrefix="ComponentArt" %>4<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">5<html xmlns="http://www.w3.org/1999/xhtml">6<head runat="server">7 <title>Untitled Page</title>8</head>9<body>10 <form id="form1" runat="server">11 <atlas:ScriptManager ID="ScriptManager1" EnablePartialRendering="true" EnableViewState="true"12 runat="server" />13 <div>14 <ComponentArt:TreeView EnableViewState="true" ID="TreeView1" runat="server" Height="300px"15 Width="200px" OnNodeSelected="TreeView1_NodeSelected">16 <Nodes>17 <ComponentArt:TreeViewNode ID="root" runat="server" AutoPostBackOnExpand="True" Text="Root"18 Value="The Root" AutoPostBackOnSelect="True" Expanded="True">19 <ComponentArt:TreeViewNode ID="child1" runat="server" AutoPostBackOnExpand="True"20 AutoPostBackOnSelect="True" Text="Child One" Value="Child 1">21 <ComponentArt:TreeViewNode ID="child11" runat="server" AutoPostBackOnSelect="True"22 Text="Child 1-1" Value="Child 1-1">23 </ComponentArt:TreeViewNode>24 </ComponentArt:TreeViewNode>25 </ComponentArt:TreeViewNode>26 </Nodes>27 </ComponentArt:TreeView></div>28 <atlas:UpdatePanel ID="updateLabel" Mode="Conditional" runat="server" EnableViewState="true">29 <ContentTemplate>30 <asp:Label ID="lblNodeValue" runat="server"></asp:Label>31 </ContentTemplate>32 <Triggers>33 <atlas:ControlEventTrigger ControlID="TreeView1" EventName="NodeSelected" />34 </Triggers>35 </atlas:UpdatePanel>36 </form>37</body>38</html>39
No comments:
Post a Comment