Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
785
Reg: Need help on Infragistics WebDataTree Node Properties & methods
posted

HI,

 Previous we used UltraWebTree for that we used below properties & functions in our project. Now we are Migrating UltrsWebTree to WebDataTree. Please let me know Alternate of below properties & Functions supporting to WebDataTree

we used for UltraWebTree properties & functions like igtree_getNodeById, node.getDataKey, igtree_getTreeById

function UltraWebTreeResourceFolders_AfterNodeSelectionChange()
    {                                                          
        var selectedNode = tree.getSelectedNode();
        var folderKey = selectedNode.getDataKey();
                  
             // Logic


            selectedNode.scrollIntoView(false);             
        }
    }

 var childkey = childNode.getDataKey();
 if(dataKey == childkey)
   {                    
         if(!childNode.getExpanded())
       {
           childNode.setExpanded(true);
         }                    
         childNode.set_Selected(true);                                            
           childNode.scrollIntoView(false);
           return;
      }

Thanks in advance

Thanks & Regards

Ram

Parents
No Data
Reply
  • 10685
    Suggested Answer
    Offline posted

    Hello,

    In case of migration, I recommend you to review the API documentation for the newer WebDataTree to learn more about the control:http://help.infragistics.com/doc/ASPNET?page=Web_WebDataTree.html
    This will ensure you will get to know the new control faster. I believe once familiar with the existing API, it will be easier to achieve a similar functionality.
     

    igtree_getTreeById - You could find the WebDataTree at the client using the AJAX $find method.
    You could use one of the following approaches, in order to access the WebDataTree with specific ID’s at the client side:
    var tree = $find("<%=this. WebDataTree1.ClientID%>"); 

    And in case you have ensured the use of static id for the WebDataTree when initialized on the server (like WebDataTree1.ClientIDMode = System.Web.UI.ClientIDMode.Static;), you could use the following client side syntax as well: var tree = $find("WebDataTree1")
    In general, by defining 'ClientIDMode' as static you are saying that your 'ClinetID' and 'ServerID' will have the same values.     

    igtree_getNodeById – No exact equivalent is existing. You could use the node address to achieve similar functionality. Details here
    Additionally it is possible to navigate to a specific node like using getNode function.
    $find("WebDataTree1").getNode(1) 

    node.getDataKey - You could use DataItem or the Key property of WebDataTree nodes. 

    Since it is not possible to connect each existing property to a new equivalent, I suggest you to look at the shared resources. During the migration you may also want to search through the forum for similar issues as many others have already faced similar issues. 

    You may also benefit from the following resources:

    WebDataTree Official Doc Section
    WebDataTreeDocumentation
    WebDataTree ClientSide Library
    WebDataTree Namespace
    Node class Members
    Online Samples
    WebDataTree FAQ

Children