Post Back Tree view when tree node check changed

Hi everyone, 
I have a tree view, both child and parent have check box. I want to check all the child on the parent selection. 
I try "SelectedNodeChanged" but the page doesn't post back to fire my function.
I know I can use javascript to post back the page, but is there any other way to post back my page without javascript???  
Thnaks in advance. 

Hi everyone, 
I have a tree view, both child and parent have check box. I want to check all the child on the parent selection. 
I try "SelectedNodeChanged" but the page doesn't post back to fire my function.
I know I can use javascript to post back the page, but is there any other way to post back my page without javascript???  
Thnaks in advance. 
Assuming this is a WinForm application (it looks like it may not be), the following works pretty well:
Option Strict On
Option Explicit On
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
With TreeView1
.CheckBoxes = True
.ShowLines = True
.ShowPlusMinus = True
.ShowRootLines = True
.ExpandAll()
End With
End Sub
' Updates all child tree nodes recursively.
Private Sub CheckAllChildNodes(ByVal treeNode As TreeNode, ByVal nodeChecked As Boolean)
Dim node As TreeNode
For Each node In treeNode.Nodes
node.Checked = nodeChecked
If node.Nodes.Count > 0 Then
' If the current node has child nodes, call the CheckAllChildsNodes method recursively.
Me.CheckAllChildNodes(node, nodeChecked)
End If
Next node
End Sub
' NOTE This code can be added to the BeforeCheck event handler instead of the AfterCheck event.
' After a tree node's Checked property is changed, all its child nodes are updated to the same value.
Private Sub node_AfterCheck(ByVal sender As Object, ByVal e As TreeViewEventArgs) Handles TreeView1.AfterCheck
' The code only executes if the user caused the checked state to change.
If e.Action <> TreeViewAction.Unknown Then
If e.Node.Nodes.Count > 0 Then
' Calls the CheckAllChildNodes method, passing in the current
' Checked value of the TreeNode whose checked state changed.
Me.CheckAllChildNodes(e.Node, e.Node.Checked)
End If
End If
End Sub
End Class
The reference for that is this MSDN document.
If you're looking for a true tri-state operation though, honestly you might want to look at some third-party controls.
I hope that helps. :)
Please call me Frank :)

Similar Messages

  • Do I need to recreate the View when the underlying field changes?

    Re: Do I need to recreate the View when the underlying field changes?
    I did an ALTER TABLE1 to change FIELD1 from varchar(5) to varchar(7). TABLE1.FIELD1 is in VIEW1. When I do a SELECT * FROM VIEW1 it shows 7 characters. But when I look at VIEW1 in object explorer (after refreshing), FIELD1 is varchar(5). Do I care?
    Should I recreate the VIEW1?

    If you have refreshed using sp_refreshview stored procedure then you are good, if not then here you go...
    The metadata for the view is not automatically updated when the tables are modified.
    The fix is to either drop and re-create or alter the view or to use the sp_refreshview stored procedure.
    Example :
    EXEC sp_RefreshView View_Tablename
    GO
    http://msdn.microsoft.com/en-us/library/ms187821.aspx
    Raju Rasagounder Sr MSSQL DBA

  • How to have a tree view for value node..

    Hi all,
    I need to display a tree view for a value node in web ui  just like a model node, for a custom view in a pop up. Please guide me  how to do this or let me know the process steps.
    Thanks in advance.

    Hi All,
    while debugging I found that in class CL_BSP_WD_CONTEXT_NODE_TREE , the method GET_T_TABLE the below code is not triigerring for the child node attributes ( to trigger the get method of attribute for value node).
    this call method is not triggering at all only for first coulmn its triggering ..
      LV_TN ?= ME->NODE_MAPPER->GET_NODE_OBJECT( <LINE>-NODE_KEY ).
        CONCATENATE 'GET_' COMPONENT INTO LV_METHOD.
        TRY.
            CALL METHOD LV_TN->(LV_METHOD)
              EXPORTING
                ATTRIBUTE_PATH = ''
              RECEIVING
                VALUE          = VALUE.
          CATCH CX_ROOT INTO LV_ERROR.
    I created the GETTER method inthe class CN01 and CN02. But those methods are not triggered in CALL METHOD LV_TN->(LV_METHOD). Even that class CN02 is having the  same methods. Those methods are already Implemented. May I know what was the reason Why those methods are not triggered ( getter method ). With out that Method data will not display in the Tree view. Can anybody tell me the reason why it is not happenning?
    .Please find the below .HTM code  as well.
    <chtmlb:configTree
                          actionsMaxInRow       = "5"
                       id             = "Table1"
                       nodeTable      = "<%= ZTREEVIEW->node_tab %>"
                       table          = "//ZTREEVIEW/Table"
                       noFrame        = "FALSE"
                       personalizable = "TRUE"
                       onCollapseNode = "NODECOLLAPSE"
                       selectionMode  = "MULTILINEEDIT"
                       onExpandNode   = "NODEEXPAND"
                       onRowSelection = "select" />
    Only one column was triggered another column did not get any value becasue of the above method call fail.. We are not restricted anywhere to display one column value in the output.   Even in Debugging I checked that LV_METHOD  is having the method name. CN02 class is also having the  same method, But it is not going into the method. It is coming out side. What could be  the reason I could not able to understnad.
    Please provide me some pointers on the issue....
    Thanks in advance..

  • How to blick tree view few specific nodes

    here i got a code which show how to blink tree view node but i am confuse that how to blink few node.
    Answered by:
    Avatar of Tamer Oz
    20,185
    Points
    Top 0.5
    Tamer Oz
    Partner Joined Sep 2009
    2
    8
    17
    Tamer Oz's threads
    Show activity
    Treeview control - How to make a node blink?
    Visual Studio Languages
    .NET Framework
    >
    Visual C#
    Question
    Alert me
    Question
    Vote as helpful
    0
    Vote
    Hi,
    Is there a "elegant" way to make blink a treeview node?
    I am thinking to use a timer with the collection of nodes that I want to make the blink effect, and update the icon ...
    Friday, November 06, 2009 6:19 PM
    Reply
    |
    Quote
    |
    Report as abuse
    Avatar of Kikeman
    Kikeman
    R. BOSCH
    105 Points
    All replies
    Question
    Vote as helpful
    0
    Vote
    Hi,
    You can develop your custom control for this purpose. The logic you mentioned was correct. Here is a sample control that I developed by the logic you mentioned.
    public class BlinkingTreeView : TreeView
    private Timer t = new Timer();
    private List<TreeNode> blinkingNodes = new List<TreeNode>();
    public BlinkingTreeView()
    t.Interval = 1000;
    t.Tick += new EventHandler(t_Tick);
    bool isNodeBlinked = false;
    void t_Tick(object sender, EventArgs e)
    foreach (TreeNode tn in blinkingNodes)
    if (isNodeBlinked)
    //update Icon
    tn.Text = tn.Text.Substring(0, tn.Text.Length - 1);//to test
    isNodeBlinked = false;
    else
    //update Icon
    tn.Text = tn.Text + "*";//to test
    isNodeBlinked = true;
    public void AddBlinkNode(TreeNode n)
    blinkingNodes.Add(n);
    public void RemoveBlinkNode(TreeNode n)
    blinkingNodes.Remove(n);
    public void ClearBlinkNodes()
    blinkingNodes.Clear();
    public List<TreeNode> BlinkingNodes
    get { return blinkingNodes; }
    public int BlinkInterval
    get { return t.Interval; }
    set { t.Interval = value; }
    public void StartBlinking()
    isNodeBlinked = false;
    t.Enabled = true;
    public void StopBlinking()
    t.Enabled = false;
    just show me how to use BlinkingTreeView class. i will have tree view which will have few node and few nodes may have few child nodes. now how to achieve by this class BlinkingTreeView and show me how to blink few specific node not all. thanks

    better to come with code. first populate tree view with some dummy node this way
    Root
           Child1
                    Child1-sub1
                    Child1-sub2
           Child2
                    Child2-sub1
                    Child2-sub2
    now blink Child1-sub2 & Child2-sub1. please come with code. thanks

  • Tree item when-tree-node-selected fires differently from 6i to 10g.

    In forms 6i, when you keyboard navigate between tree nodes, the wtns trigger will fire. In 10g it does not. In 10g, it will fire if you press the tab key or mouse click on a node.
    Anyone know if this was done on purpose?
    I ran into this after finally trying my props.fmb in 10g. It works fine in 6i, but not in 10g
    copy of my form is here:
    http://www.tailboom.com/oracle.php
    Forms [32 Bit] Version 6.0.8.18.3 (Production) cleint server
    Forms [32 Bit] Version 10.1.2.0.2 (Production)
    I wrote most of the tree handling code for oracle apps APPTREE. This is the code that most if not all tree's in apps uses to build standard tree. So I have a pretty good understanding of the forms tree item. And know the wtns fired for web forms 6i on every node like 6i client server. This is very strange IMO.
    Thanks.
    --pat                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Oleg,
    thanks for the reference. Although the bug you identify deals with when-tree-node-activated, it is possible they fixed the when-tree-node-selected issue at the same time. With my test tree, i can currently duplicate both issues. I tried to download the patch, but it is only available for linux and unix. No windows patch. I don't have my linux env up and running to where I can test yet. So I can not confirm.
    --pat                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • JTree scrollbar problem - can't scroll back to top when some nodes hidden

    I have a problem which I cannot resolve: I have a JTree which has had 88 rows added to it, and which then has 15 or so rows set to be not visible; when I then scroll to the bottom of the pane I am unable to scroll all the way back to the top using either the scroll button at the top of the bar or the mouse scroll wheel although I can drag the knob to get to the top; using the button or wheel, the scrolling stops somewhat short of the top; via testing I've found that the AdjustmentEvent is not fired when it reaches that point. Anyone seen this before and/or know a way around it?
    Thanks in advance,
    Mike

    MikeAuerbach267 wrote:
    It turns out that my problem was due to the fact that I am using my own TreeCellRenderer which makes invisible some nodes via user option but doesn't reload the tree; hence the confusion as to the scrollbar size. I now correctly reload after user option has changed rather than render nodes invisible and all is fine. Which reinforces Andrew's view in reply #1 that a 'vague waving about of hands' does not allow the forum members to help.

  • Catalog manager not showing the tree view

    Hey Everyone
    I cannot see the tree view when i login in the catalog manger in the online mode.What could be the reason? I can see only the \ folder but not the shared,system and users folders.I checked even the instance config file and made sure the path was right.
    Thanks

    what does emctl status dbconsole show?
    Hi All,
    I have installed 10g in Win 2000. Enterprise manager
    was working fine after installation. I restarted the
    Oracle Service (DB Service, TNS, iSQL, DBControl)
    from services in Control Panel. Database is up and
    working fine but the Enterprise Manager is not
    working. When I am trying to use the EM through
    Internet Explorer, it is not asking for any login and
    showing as database as down. I am able to connect to
    DB from client PC. Please advice.

  • Tree View Issue

    I am parsing an XML file to construct my data model for the tree view.
    Tree view is being constructed , but when I expand my root node, its children including their subchildren are shown.
    Behaviour should be that on clicking a parent node , its immediate children should be shown i.e 1level hierarchy .
    But in my case subchildrens of a  child are also shown on expanding my root node.(beyond 1 level hierarchy).
    Is there any way to prevent showing of subchildrens on expanding parent node.
    e.g
    A->
        B->
            C
            D
    In above example when expanding A , only B should be shown.But in my case C &D are also shown.
    Also button used for expanding subnodes of B is shown as unexpanded .(i.e its not upside down even though its children are expanded)

    Hi,
    I believe it is just administrators that can view it in tree mode, unless somebody knows any different.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to add Icon in Tree View in Forms 6.0 (URGENT..!)

    Hello All,
    I want to add icons in tree view (hierarchical tree) by using
    forms 6.0.
    So pls. help me to find out the solution for the same.
    thanks
    Pradeep
    null

    Pradeep (guest) wrote:
    : Hello All,
    : I want to add icons in tree view (hierarchical tree) by using
    : forms 6.0.
    : So pls. help me to find out the solution for the same.
    : thanks
    : Pradeep
    hello pradeep,
    for adding icons in the tree, u willhave to look closely to the
    data format for the tree.in the data format used for populating
    the tree we are supplying 5 fields. the state of the tree node
    (expanded or collapsed), the depth of the node w.r.t the parent
    node, the node value, the node label(what we see on the tree)
    and the node icon which we want to use. for the node icon we
    have to provide the entire path of the icon file. that's it.
    hope this will solve the problem
    null

  • Hiding report title in Group Tree View Pane

    In a .rpt file, if I provide a Group Field, it is displayed in the "Group Tree View" when I preview the report.
    The Group Tree View pane also contains the name of the report - actually the title. Is there a way that I can choose not to show report title on this pane?
    Here is my requirement:
    I'm localizing the report file and that includes localizing group names too. I've also localized the report title by using a formula and displaying the formula in the report header. But this pane - Group Tree View -  uses report title from "Special Fields", which I'm not able to modify. So I'm always getting the non-localized report title displayed on this pane, which I want to avaid somehow.
    If I remove report title from the report properties, this pane shows report file name instead, which again i do not want to be displayed.
    Rgds,
    Chris

    After removing the report title from the report properties try to place a space " " in the report title field in summaryinfo so that a blank space is shown in the group tree.
    Regards,
    Raghavendra

  • I get 0x8007000d error when i try to change any of my music details,like genre of artist,or any of them.

    I have just installed a copy of Windows 7 ultimate,and i have all the latest updates for it.But when i went to my music folder i understood that explorer sees the half of the details on it and doesn't let me change it.It keeps throwing this error back at me,when i attempt to change it in the bottom bar.ITunes sees the details,so is my Windows Media Player,they don't let me change it though.Please help.

    Hi,
    Thank you for the post.
    It seems that the metadata of the music is not fully compatible with Windows 7. You can upload one of the music file to the http://skydrive.live.com/ using your Live ID. Here are the detailed steps: http://social.technet.microsoft.com/Forums/en-US/w7itproui/thread/4fc10639-02db-4665-993a-08d865088d65
    I will check if I can change the data on our machine.
    In addition, some users resolved the issue by changing the data tagging from ID3 version 2.4 to version 2.3. Please try the following tool:
    http://download.cnet.com/ID3-TagIT/3000-2169_4-10544467.html?tag=mncol
    Please Note: The third-party product discussed here is manufactured by a company that is independent of Microsoft. We make no warranty, implied or otherwise, regarding this product's performance or reliability. 
    You can also try change the tagging to another type or reset it. NOTE: please backup the music file before modifying it.
    As for the iTunes, according to Apple site, iTunes 9 is compatible with Windows 7, you can download it from the following link:
    http://www.apple.com/itunes/download/
    Hope it helps! 
    Vivian Xing - MSFT

  • A tree-view in HTML page with nodes generated with java script in run time is not visible in the UI Automation Tree. Need Help

    I have a HTML page with an IFrame. Inside the Iframe there is a table with a tree view
    <iframe>
    <table>
    <tr>
    <td>
    <treeview id="tv1"></treeview>
    </td>
    </tr>
    </table>
    </iframe>
    In UIA, i am able to traverse till the tree view but not able to see it.
    I have used the TreeWalker.RawViewWalker Field to traverse the node from the desktop Automation.RootElement. 
    I tried to use AutomationElement.FromPoint method to check whether i am able to get that element. Fortunately i was able to get the automation element. 
    i tried to get the path to root element from the node element using the TreeWalker.RawViewWalker. I was able to get the parent path to the root element.
    But trying the reverse way like navigating from root element to tree node, was not getting the element for me. 
    Please help me with suggestions or inputs to resolve this issue. 

    Thanks Bernard,
    It works fine with JInitiator but not working with
    the JPI. For JPI what settings I need to do ??hi TKARIM and Bernard, i am having similar problem even with the Bernard's recommended setup. could you post the webutiljini.htm (i presume you are using config=test) ?
    i am actually using jinitiator 1.3.1.28 with Oracle HTTP Server of OAS 10gR2) calling Forms Server 6i (f60cgi). After setting up according to Bernard's recommended setup steps, the java console showed that it loaded the icon jar file when it could not read the form, but it skipped the loading of the icon jar file once it read and started the form. How do we specify in the form to pick up the icon from the jar file instead from a directory ? Or do we need to specify ? Any ideas ?
    Thx and Regards
    dkklau

  • Tree view control - populating speed - over 100 nodes

    I have a few questions about a tree view control:
    1. If you put more than approximately 100 nodes in a tree, it populates too slow. There is no change if you try with query or record group. I figured that the populating of the record group makes all problems, but there is no chance to enlarge the array siye of the record group. Developer 6 has some built-ins which can do that, bu after many unsuccesful tries I don't see a solution.
    I tried to make fetches from cursor into a record group (30 nodes on a "page", but it looses a real hierarchy and you should do a lot of programming). If anybody knows how to make the population of the tree faster or have some template / please forward.
    2. After we put the patch 5 of developer6, tree view control is totally unpredictable. Usually its when you programmaticaly try to select a node (ftree.set_tree_selection)...Anybody have the same problems?

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Natasa Stojovska ([email protected]):
    I have a few questions about a tree view control:
    1. If you put more than approximately 100 nodes in a tree, it populates too slow. There is no change if you try with query or record group. I figured that the populating of the record group makes all problems, but there is no chance to enlarge the array siye of the record group. Developer 6 has some built-ins which can do that, bu after many unsuccesful tries I don't see a solution.
    I tried to make fetches from cursor into a record group (30 nodes on a "page", but it looses a real hierarchy and you should do a lot of programming). If anybody knows how to make the population of the tree faster or have some template / please forward.
    <HR></BLOCKQUOTE>
    Try taking out the 'start with' and 'connect by' clauses in your select statement if you're using them. However, this will mean that you will have to determine the levels of the tree manually and ensure that the data comes out in the same order each time you execute the select statement.
    null

  • [Win/CS3] Problem with tree view nodes display In Release Version of InDesign

    b [Win/CS3]
    Hi All,
    I am Facing a problem from last few days.I have a dialog on which i have a treeview ListBox.I am filling this listBox dynamically.On a Button click Event.
    My requirement is to show Some text value on the node and Index value on the back end.So When i select String1 the index1 should be Selected.
    b This Listbox is working fine ON Debug Version. But Crashing On Release Version.That seems Strange to me..........?????????
    b in DialogObserver::Update on button click event
    NodeID node = IDCGridNodeID::Create(IndexX);
    treeMgr->NodeAdded(node);
    b and in TreeviewMgr::ApplyDataToWidget
    TreeNodePtr<IDCGridNodeID> nodeID(node);
    PMString IndexNo= nodeID->GetName();
    I am going to database and retrieving string value according to that
    IndexNo.
    WCHAR Buf[200];// this contains value retrieve from database
    Then i am converting WCHAR[] to CHAR[] BY using
    size_t origsize = wcslen(Buf) + 1 ;
    const size_t newsize = 100;
    size_t convertedChars = 0;
    char nstring[newsize];
    wcstombs_s (&convertedChars, nstring, origsize, buf, _TRUNCATE);
    PMString StringToDisplay(nstring);
    //Till here its working fine
    But when i am setting this value as Node name
    style.Translate();
    setNodeName( widgetList, StringToDisplay, kIDCTVTextWidgetID );
    and function return kTrue; statement executed The application is crashing.
    With error showing
    b INdesign Encountered a problem Needs to close.
    I Am not able to find out why this is not working on Release while it is working fine on debug version..???????????????????
    Is I am missing or Made some changes For release version..????
    Thanks,

    Hi Michael,
    Thanks for your reply.
    The lines
    NodeID node = IDCGridNodeID::Create(IndexX);
    treeMgr->NodeAdded(node);
    are working fine for Both Debug N Release version.The Application Is crashing In tree view manager class as i explained.
    while it works fine without having even a single warning in debug version.
    I read the document and i find out if i want to add node in treeview i have to call
    treeMgr->NodeAdded(node);
    which will call manager
    b and in TreeviewMgr::ApplyDataToWidget
    i am getting my node name as
    TreeNodePtr<IDCGridNodeID> nodeID(node);
    PMString IndexNo= nodeID->GetName();
    I don't think that something is wrong in this but i am not sure becoz i am new in indesign development.
    for adding nodes i referred the SDK examples.I found the same code for adding.

  • When-tree-node-selected not fire while navigating through keyboard(Urgent)

    i am using treeview for displaying chart of account and fires the above said trigger in the form, but the trigger has no effect whilt navigating tree view with keybpard arrow keys until user explicitly select the node through mouse help me out plzz
    i want that trigger also fires when user navigate and select node through keyboard or through mouse thanks
    its urgent

    Stop duplicating your threads!!!
    when-tree-node-selected (Urgent)
    You posted the same question 2 days ago and I've answered you, you didn't even provide an exact version of your forms.
    Posting again will not change your problem.
    Do not waste space on the forum.

Maybe you are looking for

  • Itunes crashes on start up

    SInce I did the last software upgrade, I cannot open ITUNES and also SKYPE. The softwares crash when trying to open them, I've also tried downloading again both softwares but do not work. Please, advise on solving this problem.

  • Does anybody know where to buy a centronics cable?

    I have a power pc G4 with firewire ports. And I have a hp printer that has a 36 pin (mini) centronics parallel port. Does anybody makean adapter for this ? Thank you.

  • 10.2.0.4 RAC, DBCA error

    Encountered the following error while creating database on 10.2.0.4 RAC: alert_gsnrac1.log: SMON: enabling cache recovery Tue Sep 1 23:08:23 2009 Errors in file /u01/admin/gsnrac/udump/gsnrac1_ora_2050.trc: ORA-00704: bootstrap process failure ORA-39

  • Unable to connect to the Livecycle Server in CM (Non Turnkey Install)

    As per the guide, I performed the following steps in the non turnkey install of LiveCycle 1) Installed the JDK 1.5.0_11 2) Copied the Jboss 4.0.3 folder from the install folder to C:\jboss 3) Created the datasource and JMS for Oracle 4) Installed the

  • Opening Word Document

    Wonder if anyone has encountered this problem and how they resolved it. I have sent a word formated document to others as an attachment, who than come back to say they cannot open it. They are using MS Word although not with the Mac. The document I s