Loading Advanced XML Schema into TreePanel

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    Hi Dimitris,

    Thanks, I can see the events, but not exactly sure how best to implement in my context. I am dealing with multiple treepanels (all built in code-behind) within a CardLayout panel and swap the relevant treepanel into view as required on client-side. (Each treepanel has unique ID). If I am understanding correctly it appears best approach is to pass some of the node attributes as well as node CustomAttributes (as in below example) from the respective clicked node to the ItemClick handler to then manage what needs to happen. Essentially I have a library of server-side methods that could be invoked depending on configuration. The onClick value held would be the method to call and would include the parameters to pass as well, often including {} curly braces and () brackets as well. Some examples of the XML values for onClick which I intend storing as CustomAttributes are:


    onClick="do_something('{XEXFX3X4-EX99-4XE2-X0XF-51X7X4X5EX55}');"
    onClick="do_something_else('1','0','00000000-0000-0000-0000-000000000000','YEYFY3Y4-EY99-4YE2-Y0YF-51Y7Y4Y5EY55','ZEZFZ3Z4-EZ99-4ZE2-Z0ZF-51Z7Z4Z5EZ55');"
    do_something and do_something_else are server side methods. Intention was to call the method direct from an onclick event, hence have it pre-loaded.

       return new Ext.Net.Node
               {
                   Text = text,
                   NodeID = nodeID,
                   Qtip = tooltip,
                   CustomAttributes = 
                    { 
                        new ConfigItem("pID", pID), 
                        new ConfigItem("appID", appID),
                        new ConfigItem("children", children)
                        new ConfigItem("imageBase", imageBase), 
                        new ConfigItem("imageOpen", imageOpen),
                        new ConfigItem("onClick",onClick)
                    }
               };
    PS. Can you also confirm I should strip {} curly braces / how to deal with it as it appears it is throwing problems on execution.
    Last edited by Dimitris; Apr 12, 2015 at 6:47 PM.

Similar Threads

  1. XML Extnet Schema to avoid Information Error in web.config
    By equiman in forum Examples and Extras
    Replies: 4
    Last Post: Mar 19, 2015, 3:25 PM
  2. [CLOSED] DB Schema for Calendar
    By rthiney in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Oct 30, 2014, 8:41 PM
  3. [CLOSED] pre-loading a TreePanel BUT only for 1 or 2 levels?
    By adrianot in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: May 07, 2014, 2:54 PM
  4. [CLOSED] GridPanel / Store schema
    By methode in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Jan 13, 2009, 3:43 PM

Tags for this Thread

Posting Permissions