Node Events

Index

    Node Events

    EDIDocumentViewer a exposes an event called NodeSelected. This will allow developers to know when a node is selected. A node can be either a loop, segment, element or composite element.

    Example

    ediDocumentViewer1.NodeSelected += new System.EventHandler<RDPCrystalEDILibrary.UI.Winforms.EDINodeSelectedEventArgs>(NodeSelected);
     
    private void NodeSelected(object sender, EDINodeSelectedEventArgs e)
    {
       if (e.SelectedObject is DataElement)
       {
       }
       else if (e.SelectedObject is LightWeightElement)
       {
       }
       else if (e.SelectedObject is Loop)
       {
       }
       else if (e.SelectedObject is LightWeightLoop)
       {
       }
    }
    Depending on if you were displaying an EDIDocument or a EDILightWeightDocument the SelectedObject will be of that category type.
    in EDI Document Viewer
    Did this article answer your question?