SharePoint Custom Tree view with CheckBoxes

How to Unhide and Hide Treenodes in treeview based on Checkbox checked changed event in Asp.net
Badri

How to
 hide/unhide the all Treenodes on Treeview based on Checkbox changed event?
Checkbox(Control)
1.Checkbox Checked:(Action below like)
 if user click on  Checkbox, all the treenodes on treeview is hide.
2.Checkbox Unchecked(Action below like)
If user uncheck the Checkbox  all the treenodes on treeview is unhode.
Thank you for your understanding, Iam not good at english.
Could you please help me how to do above one.
Badri

Similar Messages

  • Creating TREE REPORT with CHECKBOX against each row

    Hi Friends,
    I need to create a <b>TREE REPORT with  CHECK BOX</b> against each row. when the user selects a row and clicks on a custom button then those should get populated into an internal table. <b>This is HIGH priority</b> one and I have tried my best but couldnt find any solution. Please advise me some sol.
    thanks in advance for your valuable time and help.
    Regards
    srithan
    Message edited by me for easyness
            Reddy

    Hi
    Following code is to add checkboxes in ALV tree:
    FORM add_root_request USING pls_data_ TYPE csg_gs_outtab_p_key__l_is_sub_node_ TYPE c
    CHANGING pl_carrid_key._node = nodes->add_node( related_node = p_key
    relationship = cl_gui_column_tree=>relat_last_child ).
    ... §0.2 if information should be displayed at
    the hierarchy column set the carrid as text for this node
    text = p_ls_data-object.
    node->set_text( text ).
    ... §0.3 set the data for the nes node
    node->set_data_row( p_ls_data ).
    item = node->get_hierarchy_item( ).
    item = node->get_item( 'FCHECKBOX' ). "FCHECKBOX is my radio button field in internal table which I am using to populate the ALV
    item->set_type( if_salv_c_item_type=>checkbox ).
    pl_carrid_key = node->get_key( )._
    CATCH cx_salv_msg.
    ENDFORM_._Following code is for handling checbox_change event
    PERFORM application_action_events.
    FORM application_action_events .
    data: lr_events type ref to cl_salv_events_tree.
    *data gr_events type ref to lcl_handle_events.
    lr_events = gr_tree->get_event( ).
    create object gr_events.
    set handler gr_events->check for lr_events.
    set handler gr_events->on_link_click for lr_events.
    set handler gr_events->on_before_user_command for lr_events.
    set handler gr_events->on_after_user_command for lr_events.
    set handler gr_events->on_keypress for lr_events.
    endform. " application_action_events----
    CLASS lcl_handle_events DEFINITION.
    PUBLIC SECTION.
    METHODS:
    check FOR EVENT checkbox_change OF cl_salv_events_tree IMPORTING node_key columnname checked. "Here node_key is the row number
    ENDCLASS. "lcl_handle_events DEFINITION
    CLASS lcl_handle_events IMPLEMENTATION
    §4.2 implement the events for handling the events of cl_salv_table
    CLASS lcl_handle_events IMPLEMENTATION_._
    METHOD check_._
    WRITE 'hello'_._
    DATA lwa_modify_check_ TYPE REF TO csg_gs_outtab.
    node_key = node_key - 1_._
    READ TABLE csg_gt_list INDEX node_key REFERENCE INTO lwa_modify_check._
    if columnname = 'FCHECKBOX'_._
    IF checked = 'X'_._
    If the value in internal table is set to X, then it is deselct
    lwa_modify_check->fcheckbox =_ ' '_._
    ELSE_._
    lwa_modify_check->fcheckbox =_ 'X'_._
    ENDIF_._
    ENDIF_._
    if columnname = 'CHECKBOX_READ'_._
    IF checked = 'X'_._
    If the value in internal table is set to X, then it is deselct
    lwa_modify_check->checkbox_read =_ ' '_._
    ELSE_._
    lwa_modify_check->checkbox_read =_ 'X'_._
    ENDIF_._
    ENDIF_._
    *MODIFY TABLE csg_gt_list from l_wa_modify_check.
    flag_test = flag_test + 1_._
    ENDMETHOD_._ "check
    ENDCLASS_._ "lcl_handle_events IMPLEMENTATION
    Please give me reward points

  • ALV Tree Problem with Checkboxes

    Hello,
    i've got a problem.
    I have an ALV-Tree and die ALV-Detaillist of the tree are type checkbox.
    That's working correct.
    But i want to fill initial data in the checkboxes but the checkbox isnt set.
    i've done as followed:
      CALL METHOD go_alv_tree->set_table_for_first_display
        EXPORTING
         I_STRUCTURE_NAME     =
         IS_VARIANT           =
         I_SAVE               =
          i_default            = abap_false
          is_hierarchy_header  = ls_header
         IS_EXCEPTION_FIELD   =
         IT_SPECIAL_GROUPS    =
         IT_LIST_COMMENTARY   =
         I_LOGO               =
         I_BACKGROUND_ID      =
         IT_TOOLBAR_EXCLUDING =
        CHANGING
          it_outtab            = <go_data_tab>
         IT_FILTER            =
          it_fieldcatalog      = lt_fcat.
    fieldcat are several fields all as checkbox.
    Then i get a component of the output structure and set a X.
    ASSIGN COMPONENT lv_help_arbpl OF STRUCTURE <go_data_struc>
                           TO <fs_arbl>.
          IF <fs_arbl> IS ASSIGNED.
            <fs_arbl> = lc_xfeld.
          ENDIF.
            CALL METHOD go_alv_tree->add_node
              EXPORTING
                i_relat_node_key     = lv_matnr
                i_relationship       = cl_gui_column_tree=>relat_last_child
                is_outtab_line       = <go_data_struc>
                is_node_layout       = ls_layout
             IT_ITEM_LAYOUT       =
                i_node_text          = lv_node_text
              IMPORTING
                e_new_node_key       = lv_period
              EXCEPTIONS
                relat_node_not_found = 1
                node_not_found       = 2
                OTHERS               = 3.
    in <go_data_struc> the fields which should be set, are set with X.
    But after i add all of my nodes and do CALL METHOD p_go_alv_tree->frontend_update, the checkbox is empty but there is an X in the field beside the checkbox.
    Thanks in advance.
    best regards,
    Dennis

    Ok i solved the problem.
    best regards,
    Dennis

  • Tree View with BLOB

    Ive displayed some workers with their departments in a tree view, but does somebody now how to put in their BLOB picture instead of their name into the tree view.
    i thougt that i just rewrite the tree views "Node Text Template" but therefore i will need the image src??? so how to get the src from the BLOB picture from the table???
    <tr>#INDENT#<td colspan="#COLSPAN#" valign="CENTER" class="tiny">#NAME#</td>
    <td>
    <img src=???????????? /> // it could be the worker number or something to get the blob src.
    </td>
    </tr>
    Please help me.
    thanks.

    807703,
    Can you set your name on the forum settings?
    Ok, the item name is just an example, your just using it as a placeholder to pass the key to the picture you want to receive, if your tree is on page 3, create the item called P3_EMP_NO for example.
    Your then setting the value of that item through the image source URL, and the application process can use it to present the right picture.
    If you want to see a sample of this working in 4.0 take a look at my app on apex.oracle.com.
    http://apex.oracle.com/pls/apex/f?p=9660:200 (tested in chrome only - should work on all browsers though)
    Edit: Just checked compatibility - it works in IE and chrome but not firefox! Not immediately apparent why.
    Page 200, login demo / demo2. (account has developer access so you can take a look at the page definition. There are only pictures for 4 photos).
    Note the css in the tree view region definition to change the picture and line size.
    'm guessing you're on 3.2 from your first post, I don't have 3.2 so I can't see where the img tag should go there (on 4.0 I put the url in the icon part of the sql query).
    James
    Edited by: James C on Nov 8, 2010 8:17 AM

  • SharePoint Custom New Form with DataForm Webpart SharePoint 2010

    Hi Guys,
    i have a Problem with my Custom NewForm.ASPX.  I Created a CustomForm like this Guide:
    http://www.ilikesharepoint.de/2013/11/sharepoint-create-custom-list-forms-with-visual-studio-part-2/
    Problem
    Now i set the DataFormWebpart for the Webpartzone on visible=False and add my custom DataformWebpart in this NewForm.aspx (see Code).
    After my deployment and click on "New item" i can see my custom DataForm Webpart.
    The Problems are:
    1. The Ribbon is Greyed out
    This post was not my solution. The Ribbons is not greyed out but the Ribbon has no function ("save Button" is broken)
    2. The Fields are not loaded and looks like a Displayform
    I Don't know why the Dataform does not load these fields. I can see the title but not the text Columns or lookups
    3. Save Button and the Ribbon does not work
    Only the Cancel button work on this Newform.aspx
    The Save button has no function

    Here my NewForm.aspx Link
    NewForm

  • SharePoint 2013 List View with query string filter stops working after editing view from browser

    I have created one list definition in which I have added one list view which will filter data from query string paramater
    So when I am creating list from my list definition, view with query string filter is working fine.
    But when I am modifying view from UI(I am not changing any thing , just opening "Modify View" page and then click on "Save" button), view gets stop working means it's not filtering data based on query string
    Any suggestion what I am missing?
    Below is my list view schema
    <View BaseViewID="11" Type="HTML" TabularView="FALSE" WebPartZoneID="Main" DisplayName="$Resources:OIPLBScoreCard,viewFilterTasksByTarget;" MobileView="True" MobileDefaultView="False" Url="FilteredTasks.aspx" SetupPath="pages\viewpage.aspx" DefaultView="FALSE" ImageUrl="/_layouts/15/images/issuelst.png?rev=23">
    <Toolbar Type="Standard" />
    <ParameterBindings>
    <ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
    <ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_DEFAULT)" />
    <ParameterBinding Name="TargetId" Location="QueryString(TargetId)" />
    </ParameterBindings>
    <JSLink>hierarchytaskslist.js</JSLink>
    <XslLink Default="TRUE">main.xsl</XslLink>
    <JSLink>clienttemplates.js</JSLink>
    <RowLimit Paged="TRUE">100</RowLimit>
    <ViewFields>
    <FieldRef Name="Body"></FieldRef>
    <FieldRef Name="Title"></FieldRef>
    <FieldRef Name="StartDate"></FieldRef>
    <FieldRef Name="DueDate"></FieldRef>
    </ViewFields>
    <ViewData>
    <FieldRef Name="PercentComplete" Type="StrikeThroughPercentComplete"></FieldRef>
    <FieldRef Name="DueDate" Type="TimelineDueDate"></FieldRef>
    </ViewData>
    <Query>
    <Where>
    <Eq>
    <FieldRef Name="oipscTargetLookup" LookupId="TRUE"/>
    <Value Type="Lookup">{TargetId}</Value>
    </Eq>
    </Where>
    </Query>
    </View>
    I have one lookup field from "Target List" in my source list and I want to filter data based on that lookup field.

    Hi JayJT,
    The Miscellaneous is located in the contact list that you used for the connection.
    So , you need to edit the page, then edit the contact list that you used, in the web part properties of the contact list, you will find Miscellaneous, then expand it and select ‘Server Render’ .
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Christmas Tree Table with checkboxes

    I am using the JTable (CTTable, CTTableCellRenderer, and VisibleTableModelEvent) found at http://java.sun.com/products/jfc/tsc/articles/ChristmasTree/.
    The problem that I am having is that I inserted a column with checkboxes. In that column, it shows the text value (true/false) instead of the checkbox. When I click on a cell in the column, it shows the checkbox while the mouse button is depressed. After clicking on the cell, the checkbox disappears and the value changes (example: if it was false before clicking, it becomes true after clicking).
    Also, I have tried using my table with the standard JTable class and the checkboxes work correctly.

    Thanks Frank.
    You are correct I am setting the Bind variable via client method dropped as default activity in TF.
    I tried to utilize ensureVariableManager method in VOImpl and setting the Variable Value but when I try accessing the value of bind variable via get<BindVariableName>
    I end up in stackOverFlow error.
    Then I tried to override execute query by putting this lines before super.executeQuery();
    ensureVariableManager().setVariableValue("BindVariableName", value);
    but I guess this is not setting the Bind Variable too..
    What am I doing wrong ?
    Amit

  • SharePoint 2010 List View with Group By is Not Sorting Correctly

    My organization has a list in SharePoint 2010 that is being used as a FAQ. The list contains the following columns:
    Question-  Single line of text 
    Answer-  Multiple lines of text 
    Priority-  Number 
    Priority is the importance of the question and is a unique integer number. Higher Priority questions are to be displayed at the top of the list.
    A view has been created to display the Question and Answer columns, grouped by Question, and sorted by Prioity. The problem is that the SharePoint is not sorting by priority. I have added display of Priority and embedded a screen capture showing the order
    going non sequentially from 1,005 to 1,024 to 1,015.
    Is this a known defect? Is there a workaround? Are there other options?
    Regards,
    Darian.

    Hi,
    Based on your description, I have done a test. I can reproduce your issue.
    Per my test, I come up with a conclusion.
    When we group by Question, the list view is be grouped. Then we sort by Priority, actually it is only sort the item within a group rather than the entire list.
    So the items inside of different groups out of order is normal.
    Best Regards,
    Lisa ChenForum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]
    Lisa Chen
    TechNet Community Support

  • Dynamic Tree menu with checkbox

    Dear Boss
    Now I am in a problem for some task. But I have not ever done these. Please help me if you possible for you. I need a tree menu in java which has the following attributes:
    v This check box will implement on Oracle form
    v Checkbox Event tracking
    v On check event data will save in database
    v On check event text item of form will be re-query
    I am looking for your reply
    Aktar Chowdhury

    Play around with it, it is simpler than you think! Add a spry menu to a page with a css menu on it, see how it is structured, then make the changes to get the results you want. A Spry menu uses a UL/LI structure very similar to that generated by css_menu, you just need to add a class to the LI.
    //CSS Dynamic Menus required file
    require_once('includes/cssmenus2/gwb_Menu2.inc.php');
    //Begin Menu1
      $Menu1 = new MX_Menu2('MenuBar1');
      $Menu1->setQuery($rs_Menu1);
      $Menu1->setPK("MenuID");
      $Menu1->setFK("ParentID");
      $Menu1->setNameField("MenuLabel");
      $Menu1->setTitleField("Tip");
      //URL parameters
      $Menu1->setLinkField("Link");
      $Menu1->setTargetField("");
      // Layout
      $Menu1->setLevel(-1);
      $Menu1->setSkin("MenuBarVertical");  <---------
    //End Menu1
    body
    <?php  // Dynamic CSS Menu 
      echo $Menu1->render();
    ?>
    css_menu2.inc.php
      foreach($this->DBItems[$id] as $key=>$val){
        $li_class = ' class="MenuBarItemSubmenu"';     <-----
        //the efective row

  • TREE REPORT with CHECKBOX

    Hi
    I want a report in which the report should have tree structure and along with check box
    Regards
    Sneha

    HI
    Check this standard report
    SAPCOLUMN_TREE_CONTROL_DEMO
    *& Report  ZTREE                                                       *
    REPORT  ZTREE                                   .
    DATA: BEGIN OF ITEMS OCCURS 100,
             ID(10),
             PARENT_ID(10),
             TEXT(20),
             SYMBOL,
          END OF ITEMS,
          TABIX_STACK LIKE SY-TABIX OCCURS 10 WITH HEADER LINE,
          ITEMS_SHOW LIKE ITEMS OCCURS 100 WITH HEADER LINE.
    INCLUDE <SYMBOL>.
    \* append sample items (mixed order)
    PERFORM APPEND_ITEM USING:
        '1'  ''        'Food',
        '2'  ''        'Drinks',
        '12' '9'       'Pavan Praveen',
        '17' '11'      'company',
        '3'  ''        'Tools',
        '4'  '1'       'Dairy milk',
        '16' '11'      'Music',
        '5'  '1'       'Chocolate',
        '6'  '2'       'Alcoholic',
        '8'  '4'       'Megastar',
        '10' '5'       'Milk',
        '11' '3'       'Boost',
        '13' '9'       'Sachin ',
        '7'  '4'       'Cricket',
        '14' '2'       'Non-alcholic',
        '35' '31'      'Pepsi',
        '9'  '6'       'Thumsup',
        '15' '14'      'Coca-cola',
        '18' '6'       'Win',
        '28' '18'      'Ganguly ',
        '33' '28'      'INDIA',
        '34' '28'      'Gujarat',
        '29' '18'      'State',
        '30' '29'      'congrats',
        '19' '33'      'chiranjeevi',
        '20' '33'      'kalyan',
        '22' '19'      'here comes',
        '23' '19'      'Chandra',
        '24' '20'      'chat',
        '32' '31'      'Marvelous',
        '25' '20'      'Memorable',
        '31' '34'      'guess'.
    \* show initial list (items with level 0 - parentless items)
    LOOP AT ITEMS WHERE PARENT_ID = ''.
      MOVE-CORRESPONDING ITEMS TO ITEMS_SHOW.
      ITEMS_SHOW-SYMBOL = '+'.
      APPEND ITEMS_SHOW.
    ENDLOOP.
    PERFORM PRINT_TREE TABLES ITEMS_SHOW.
    \* at line-selection - when the node is opened/closed or item double-clk
    AT LINE-SELECTION.
      READ TABLE ITEMS WITH KEY PARENT_ID = ITEMS_SHOW-ID. "see 'hide'
      IF SY-SUBRC = 0. "item has children - expand or collapse
        SY-LSIND = 0.
        PERFORM EXPAND_COLLAPSE USING ITEMS_SHOW-ID.
        PERFORM PRINT_TREE TABLES ITEMS_SHOW.
      ELSE.            "item has NO children - perform some action
        READ TABLE ITEMS WITH KEY ID = ITEMS_SHOW-ID.
        WRITE: 'Action performed on item "' NO-GAP, ITEMS-TEXT NO-GAP,
               '", id.', ITEMS-ID.
      ENDIF.
    \* form print_tree
    FORM PRINT_TREE TABLES ITEMS STRUCTURE ITEMS.
      DATA: V_TABIX LIKE SY-TABIX,
            START_TABIX LIKE SY-TABIX,
            V_LEVEL LIKE SY-TFILL,
            V_OFFSET TYPE I,
            V_ID LIKE ITEMS-ID,
            V_PARENT_ID LIKE ITEMS-PARENT_ID,
            V_PARENT_ID_FOR_VLINE LIKE ITEMS-PARENT_ID,
            V_PREV_LEVEL TYPE I,
            V_ITEMS_COUNT LIKE SY-TFILL,
            V_VLINES_STRING(200).
      CHECK NOT ITEMS[] IS INITIAL.
      SORT ITEMS BY PARENT_ID ID.
      READ TABLE ITEMS INDEX 1.
      V_PARENT_ID = ITEMS-PARENT_ID.
      START_TABIX = 1.
      REFRESH TABIX_STACK.
      DO.
        LOOP AT ITEMS FROM START_TABIX.
          V_TABIX = START_TABIX = SY-TABIX."remember current index
          V_ID = ITEMS-ID.
          V_PARENT_ID_FOR_VLINE = ITEMS-PARENT_ID.
    \*     decrease level and exit loop if parent not the same as previous
          IF ITEMS-PARENT_ID NE V_PARENT_ID.
            PERFORM READ_FROM_STACK CHANGING START_TABIX. "level = NoOfRecs
            READ TABLE ITEMS INDEX START_TABIX.
            V_PARENT_ID = ITEMS-PARENT_ID.
            ADD 1 TO START_TABIX.   "next loop starts from parent index + 1
    \*        clear vline
            IF V_LEVEL > 1.
              V_OFFSET = 2 + ( V_LEVEL - 2 ) * 3.
              IF V_LEVEL = 1. V_OFFSET = 1. ENDIF.
              V_VLINES_STRING+V_OFFSET = ' '.
            ENDIF.
            EXIT.
          ENDIF.
          V_PARENT_ID = ITEMS-PARENT_ID.
    \*     write item
          FORMAT COLOR OFF.
    DESCRIBE TABLE TABIX_STACK LINES V_LEVEL."level is no of StackRecs
          WRITE: / V_VLINES_STRING.
          V_OFFSET = V_LEVEL * 3.
          IF V_LEVEL NE 0.
            IF V_PREV_LEVEL < V_LEVEL.
              WRITE: AT V_OFFSET '|', / ''.
              WRITE: / V_VLINES_STRING.
            ENDIF.
            V_OFFSET = V_LEVEL * 3.
            WRITE AT V_OFFSET '|--'.
          ENDIF.
          V_OFFSET = V_OFFSET + 3.
          CASE ITEMS-SYMBOL.
            WHEN '+'.
              WRITE AT V_OFFSET SYM_PLUS_FOLDER AS SYMBOL
                    COLOR 4 INTENSIFIED HOTSPOT.
            WHEN '-'.
              WRITE AT V_OFFSET SYM_MINUS_FOLDER AS SYMBOL
                    COLOR 4 INTENSIFIED HOTSPOT.
            WHEN OTHERS. FORMAT COLOR 5.
          ENDCASE.
          WRITE: ITEMS-TEXT.
          V_PREV_LEVEL = V_LEVEL.
          HIDE: ITEMS-ID.
          ADD 1 TO V_ITEMS_COUNT.
          READ TABLE ITEMS WITH KEY PARENT_ID = ITEMS-ID.
    \*     increase level and exit loop if item has children
          IF SY-SUBRC = 0.
            START_TABIX = SY-TABIX.
            APPEND V_TABIX TO TABIX_STACK. "level is no of recs in stack
            V_PARENT_ID = ITEMS-PARENT_ID.
    \*        set vline
            V_TABIX = V_TABIX + 1.
            READ TABLE ITEMS INDEX V_TABIX.
            V_OFFSET = 2 + ( V_LEVEL - 1 ) * 3.
            IF V_LEVEL > 0.
              IF ITEMS-PARENT_ID = V_PARENT_ID_FOR_VLINE AND SY-SUBRC = 0.
                V_VLINES_STRING+V_OFFSET = '|'.
              ELSE.
                V_VLINES_STRING+V_OFFSET = ' '.
              ENDIF.
            ENDIF.
            EXIT.
          ENDIF.
    \*     at last - decrease level
          AT LAST.
    \*        clear vline
            IF V_LEVEL > 1.
              V_OFFSET = 2 + ( V_LEVEL - 2 ) * 3.
              IF V_LEVEL = 1. V_OFFSET = 1. ENDIF.
              V_VLINES_STRING+V_OFFSET = ' '.
            ENDIF.
            " next loop starts from parent index, not parent index + 1
            " because of different parents level will decrease anyway
            PERFORM READ_FROM_STACK CHANGING START_TABIX.
            APPEND START_TABIX TO TABIX_STACK. "must return index to stack
          ENDAT.
        ENDLOOP.
        DESCRIBE TABLE ITEMS.
        IF START_TABIX > SY-TFILL OR V_ITEMS_COUNT >= SY-TFILL.
          EXIT.
        ENDIF.
      ENDDO.
    ENDFORM.
    \* form expand_collapse
    FORM EXPAND_COLLAPSE USING VALUE(V_ID).
      DATA: V_NO_MORE_ORPHANS,
            ITEMS_TEMP LIKE ITEMS OCCURS 100 WITH HEADER LINE.
      DELETE ITEMS_SHOW WHERE PARENT_ID = V_ID. "try to collapse
      IF SY-SUBRC = 0.                     "succesfull first collapse
        DO.            "cascade collapse - delete 'orphans' that are left
          REFRESH ITEMS_TEMP.
          MOVE ITEMS_SHOW\[] TO ITEMS_TEMP[].
          SORT ITEMS_TEMP BY ID.
          V_NO_MORE_ORPHANS = 'X'.
          LOOP AT ITEMS_SHOW WHERE PARENT_ID NE ''.
            READ TABLE ITEMS_TEMP WITH KEY ID = ITEMS_SHOW-PARENT_ID
                                   BINARY SEARCH TRANSPORTING NO FIELDS.
            IF SY-SUBRC NE 0.              "no parent - it's an orphan
              CLEAR V_NO_MORE_ORPHANS.
              DELETE ITEMS_SHOW.
            ENDIF.
          ENDLOOP.
          IF V_NO_MORE_ORPHANS = 'X'. EXIT. ENDIF.
        ENDDO.
        ITEMS_SHOW-SYMBOL = '+'.
        MODIFY ITEMS_SHOW TRANSPORTING SYMBOL WHERE ID = V_ID.
      ELSE.                                "unsuccessfull collapse - expand
        ITEMS_SHOW-SYMBOL = '-'.
        MODIFY ITEMS_SHOW TRANSPORTING SYMBOL WHERE ID = V_ID.
        LOOP AT ITEMS WHERE PARENT_ID = V_ID.      "show children
          APPEND ITEMS TO ITEMS_SHOW.
        ENDLOOP.
        LOOP AT ITEMS_SHOW WHERE PARENT_ID = V_ID. "check grandchildren
          READ TABLE ITEMS WITH KEY PARENT_ID = ITEMS_SHOW-ID.
          IF SY-SUBRC = 0.
            ITEMS_SHOW-SYMBOL = '+'.
          ELSE.
            ITEMS_SHOW-SYMBOL = ''.
          ENDIF.
          MODIFY ITEMS_SHOW.
        ENDLOOP.
      ENDIF.
    ENDFORM.
    \* form append_item
    FORM APPEND_ITEM USING VALUE(ID) VALUE(PARENT_ID) VALUE(TEXT).
      ITEMS-ID = ID.
      ITEMS-PARENT_ID = PARENT_ID.
      ITEMS-TEXT = TEXT.
      APPEND ITEMS.
    ENDFORM.
    \* form read_from_stack
    FORM READ_FROM_STACK CHANGING TABIX LIKE SY-TABIX.
      DESCRIBE TABLE TABIX_STACK.
      CHECK SY-TFILL NE 0.
      READ TABLE TABIX_STACK INDEX SY-TFILL.
      TABIX = TABIX_STACK.
      DELETE TABIX_STACK INDEX SY-TFILL.
    ENDFORM.
    Or use this FM RS_TREE_SET_CURRENT_LAYOUT
    *& Report  ZTREESTRUC                                                  *
    REPORT  ZTREESTRUC                              .
    Type-pools : fibs,stree.
    data : t_node type snodetext.
    data : node_tab like t_node occurs 0 with header line.
    clear : node_tab, node_tab[].
    node_tab-type = 'T'.
    node_tab-name = 'Earth'.
    node_tab-tlevel = '01'.
    node_tab-nlength = '5'.
    node_tab-color = '4'.
    node_tab-text = 'Hello'.
    node_tab-tlength ='5'.
    node_tab-tcolor = 3.
    append node_tab.
    clear node_tab.
    node_tab-type = 'P'.
    node_tab-name = 'Europe'.
    node_tab-tlevel = '02'.
    node_tab-nlength = '6'.
    node_tab-color = '1'.
    node_tab-text = 'Hello'.
    node_tab-tlength ='5'.
    node_tab-tcolor = 4.
    append node_tab.
    clear node_tab.
    node_tab-type = 'P'.
    node_tab-name = 'Germany'.
    node_tab-tlevel = '03'.
    node_tab-nlength = '7'.
    node_tab-color = '4'.
    node_tab-text = 'Hello'.
    node_tab-tlength ='5'.
    node_tab-tcolor = 4.
    append node_tab.
    clear node_tab.
    node_tab-type = 'P'.
    node_tab-name = 'Berlin'.
    node_tab-tlevel = '04'.
    node_tab-nlength = '6'.
    node_tab-color = '4'.
    node_tab-text = 'Hello'.
    node_tab-tlength ='5'.
    node_tab-tcolor = 3.
    append node_tab.
    clear node_tab.
    node_tab-type = 'P'.
    node_tab-name = 'Asia'.
    node_tab-tlevel = '02'.
    node_tab-nlength = '4'.
    node_tab-color = '1'.
    node_tab-text = 'Hello'.
    node_tab-tlength ='5'.
    node_tab-tcolor = 3.
    append node_tab.
    clear node_tab.
    node_tab-type = 'P'.
    node_tab-name = 'India'.
    node_tab-tlevel = '03-'.
    node_tab-nlength = '5'.
    node_tab-color = '1'.
    node_tab-text = 'Hello'.
    node_tab-tlength ='5'.
    node_tab-tcolor = 3.
    append node_tab.
    clear node_tab.
    node_tab-type = 'P'.
    node_tab-name = 'Bombay'.
    node_tab-tlevel = '04-'.
    node_tab-nlength = '6'.
    node_tab-color = '1'.
    node_tab-text = 'Hello'.
    node_tab-tlength ='5'.
    node_tab-tcolor = 3.
    append node_tab.
    clear node_tab.
    CALL FUNCTION 'RS_TREE_CONSTRUCT'
    \* EXPORTING
      INSERT_ID                = '000000'
      RELATIONSHIP             = ' '
      LOG                      =
      TABLES
        NODETAB                  = node_tab
    \* EXCEPTIONS
      TREE_FAILURE             = 1
      ID_NOT_FOUND             = 2
      WRONG_RELATIONSHIP       = 3
      OTHERS                   = 4
    IF SY-SUBRC  0.
    \* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
      DATA: type_mapping TYPE stree_ctl_type_mapping_tab.
      DATA: wa_type TYPE stree_ctl_type_mapping.
      CLEAR: type_mapping[].
        wa_type-type = 'A'.
        wa_type-icon = '@BL@'.
        APPEND wa_type TO type_mapping.
    *CALL FUNCTION 'RS_TREE_CONTROL_PREPARE'
    \* EXPORTING
      CONTROL_PATTERN             = STREE_CTL_GENERIC
       CONTROL_PATTERN             = 'PH'
    \**   HIERARCHY_HEADER            =
      INITIAL_HEADER_WIDTH        =
      LIST_ITEM_HEADER            =
      MULTIPLE_SELECTION          = 'X'
      ITEM_SELECTION              = STREE_FALSE
      SUPPRESS_NODE_ICON          = STREE_FALSE
      SUPPRESS_FOLDER_ICON        = STREE_FALSE
      CALLBACK_PROGRAM            =
      CALLBACK_ITEM_DISPLAY       =
      COLOR_MAPPING               =
        TYPE_MAPPING                = type_mapping
    IMPORTING
      SUBSCREEN_PROGRAM           =
      SUBSCREEN_DYNNR             =
    EXCEPTIONS
      NOT_AVAILABLE               = 1
      OTHERS                      = 2
    *IF SY-SUBRC  0.
    \** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
    *CALL FUNCTION 'RS_TREE_SET_CURRENT_LAYOUT'
    \** EXPORTING
      CURSOR_COLUMN             = 3
      CURSOR_LINE               = 2
      FIRST_NODE                = 1
      FIRST_NODE_TYPE           = ' '
      LIST_COLUMN               = 1
      LIST_LINE                 = 1
      LAYOUT_MODE               = STREE_LAYOUT_NORMAL
    IMPORTING
      INCONSISTENT_LAYOUT       =
    TABLES
      LAYOUT                    =
    CALL FUNCTION 'RS_TREE_LIST_DISPLAY'
    EXPORTING
    \*   CALLBACK_PROGRAM                =
      CALLBACK_USER_COMMAND           =
      CALLBACK_TEXT_DISPLAY           =
      CALLBACK_MOREINFO_DISPLAY       =
      CALLBACK_COLOR_DISPLAY          =
      CALLBACK_TOP_OF_PAGE            =
      CALLBACK_GUI_STATUS             =
      CALLBACK_CONTEXT_MENU           =
      STATUS                          = 'IMPLICIT'
      CHECK_DUPLICATE_NAME            = '1'
      COLOR_OF_NODE                   = '4'
      COLOR_OF_MARK                   = '3'
      COLOR_OF_LINK                   = '1'
      COLOR_OF_MATCH                  = '5'
      LOWER_CASE_SENSITIVE            = ' '
      MODIFICATION_LOG                = ' '
      NODE_LENGTH                     = 30
      TEXT_LENGTH                     = 75
      TEXT_LENGTH1                    = 0
      TEXT_LENGTH2                    = 0
      RETURN_MARKED_SUBTREE           = ' '
      SCREEN_START_COLUMN             = 0
      SCREEN_START_LINE               = 0
      SCREEN_END_COLUMN               = 0
      SCREEN_END_LINE                 = 0
      SUPPRESS_NODE_OUTPUT            = ' '
      LAYOUT_MODE                     = ' '
      USE_CONTROL                     = STREE_USE_LIST
       USE_CONTROL                     = 'L'.
    \* IMPORTING
      F15                             =
    **********end of program
    For Tree structure in alv
    Check this
    *& Report  ZALVTREE                                                    *
    REPORT  ZALVTREE                                .
    *Data Declaration
    TABLES:     ekko.
    TYPE-POOLS: slis.                                 "ALV Declarations
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
    END OF t_ekko.
    DATA: it_ekko     TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          it_ekpo     TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          it_emptytab TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko     TYPE t_ekko,
          wa_ekpo     TYPE t_ekko.
    DATA: ok_code like sy-ucomm,           "OK-Code
          save_ok like sy-ucomm.
    *ALV data declarations
    DATA: fieldcatalog  TYPE lvc_t_fcat WITH HEADER LINE.
    DATA: gd_fieldcat   TYPE lvc_t_fcat,
          gd_tab_group  TYPE slis_t_sp_group_alv,
          gd_layout     TYPE slis_layout_alv.
    *ALVtree data declarations
    CLASS cl_gui_column_tree DEFINITION LOAD.
    CLASS cl_gui_cfw DEFINITION LOAD.
    DATA: gd_tree             TYPE REF TO cl_gui_alv_tree,
          gd_hierarchy_header TYPE treev_hhdr,
          gd_report_title     TYPE slis_t_listheader,
          gd_logo             TYPE sdydo_value,
          gd_variant          TYPE disvariant.
    *Create container for alv-tree
    DATA: l_tree_container_name(30) TYPE c,
          l_custom_container        TYPE REF TO cl_gui_custom_container.
    *Includes
    *INCLUDE ZDEMO_ALVTREEO01. "Screen PBO Modules
    *INCLUDE ZDEMO_ALVTREEI01. "Screen PAI Modules
    *INCLUDE ZDEMO_ALVTREEF01. "ABAP Subroutines(FORMS)
    *Start-of-selection.
    START-OF-SELECTION.
    \* ALVtree setup data
        PERFORM data_retrieval.
        PERFORM build_fieldcatalog.
        PERFORM build_layout.
        PERFORM build_hierarchy_header CHANGING gd_hierarchy_header.
        PERFORM build_report_title USING gd_report_title gd_logo.
        PERFORM build_variant.
    \* Display ALVtree report
      call screen 100.
    *&      Form  DATA_RETRIEVAL
    \*       Retrieve data into Internal tables
    FORM data_retrieval.
      SELECT ebeln
       UP TO 10 ROWS
        FROM ekko
        INTO corresponding fields of TABLE it_ekko.
      loop at it_ekko into wa_ekko.
        SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
          FROM ekpo
          appending TABLE it_ekpo
         where ebeln eq wa_ekko-ebeln.
      endloop.
    ENDFORM.                    " DATA_RETRIEVAL
    *&      Form  BUILD_FIELDCATALOG
    \*       Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
    \* Please not there are a number of differences between the structure of
    ALVtree fieldcatalogs and ALVgrid fieldcatalogs.
    For example the field seltext_m is replace by scrtext_m in ALVtree.
      fieldcatalog-fieldname   = 'EBELN'.           "Field name in itab
      fieldcatalog-scrtext_m   = 'Purchase Order'.  "Column text
      fieldcatalog-col_pos     = 0.                 "Column position
      fieldcatalog-outputlen   = 15.                "Column width
      fieldcatalog-emphasize   = 'X'.               "Emphasize  (X or SPACE)
      fieldcatalog-key         = 'X'.               "Key Field? (X or SPACE)
    \*  fieldcatalog-do_sum      = 'X'.              "Sum Column?
    fieldcatalog-no_zero     = 'X'.              "Don't display if zero
      APPEND fieldcatalog TO gd_fieldcat.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-scrtext_m   = 'PO Iten'.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-col_pos     = 1.
      APPEND fieldcatalog TO gd_fieldcat..
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-scrtext_m   = 'Status'.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-col_pos     = 2.
      APPEND fieldcatalog TO gd_fieldcat..
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-scrtext_m   = 'Item change date'.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-col_pos     = 3.
      APPEND fieldcatalog TO gd_fieldcat..
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-scrtext_m   = 'Material Number'.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-col_pos     = 4.
      APPEND fieldcatalog TO gd_fieldcat..
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-scrtext_m   = 'PO quantity'.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-col_pos     = 5.
      APPEND fieldcatalog TO gd_fieldcat..
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-scrtext_m   = 'Order Unit'.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-col_pos     = 6.
      APPEND fieldcatalog TO gd_fieldcat..
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-scrtext_m   = 'Net Price'.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-datatype     = 'CURR'.
      APPEND fieldcatalog TO gd_fieldcat..
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-scrtext_m   = 'Price Unit'.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-col_pos     = 8.
      APPEND fieldcatalog TO gd_fieldcat..
      CLEAR  fieldcatalog.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
    \*       Build layout for ALV grid report
    FORM build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    \*  gd_layout-totals_only        = 'X'.
    gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
                                            "click(press f2)
    gd_layout-zebra             = 'X'.
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text       = 'helllllo'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  build_hierarchy_header
    \*       build hierarchy-header-information
    \*      -->P_L_HIERARCHY_HEADER  structure for hierarchy-header
    FORM build_hierarchy_header CHANGING
                                   p_hierarchy_header TYPE treev_hhdr.
      p_hierarchy_header-heading = 'Hierarchy Header'(013).
      p_hierarchy_header-tooltip = 'This is the Hierarchy Header !'(014).
      p_hierarchy_header-width = 30.
      p_hierarchy_header-width_pix = ''.
    ENDFORM.                               " build_hierarchy_header
    *&      Form  BUILD_REPORT_TITLE
    \*       Build table for ALVtree header
    \*  <->  p1        Header details
    <->  p2        Logo value
    FORM build_report_title CHANGING
          pt_report_title  TYPE slis_t_listheader
          pa_logo             TYPE sdydo_value.
      DATA: ls_line TYPE slis_listheader,
            ld_date(10) TYPE c.
    \* List Heading Line(TYPE H)
      CLEAR ls_line.
      ls_line-typ  = 'H'.
    \* ls_line-key     "Not Used For This Type(H)
      ls_line-info = 'PO ALVTree Display'.
      APPEND ls_line TO pt_report_title.
    \* Status Line(TYPE S)
      ld_date(2) = sy-datum+6(2).
      ld_date+2(1) = '/'.
      ld_date3(2) = sy-datum4(2).
      ld_date+5(1) = '/'.
      ld_date+6(4) = sy-datum(4).
      ls_line-typ  = 'S'.
      ls_line-key  = 'Date'.
      ls_line-info = ld_date.
      APPEND ls_line TO pt_report_title.
    \* Action Line(TYPE A)
      CLEAR ls_line.
      ls_line-typ  = 'A'.
      CONCATENATE 'Report: ' sy-repid INTO ls_line-info  SEPARATED BY space.
      APPEND ls_line TO pt_report_title.
    ENDFORM.
    *&      Form  BUILD_VARIANT
    \*       Build variant
    form build_variant.
    \* Set repid for storing variants
      gd_variant-report = sy-repid.
    endform.                    " BUILD_VARIANT 
    Regards
    Pavan

  • Tree structure with checkboxes and radio buttons

    Hi,
    I am using SNODETEXT as tree structure. On the child node, I need to have checkboxes and radio buttons. Is this possible?

    Hi
    Muse does not currently have dropdown lists, radio buttons, or checkboxes as part of the forms. You may want to check out using Adobe FormsCentral, Jotform, or Wufoo and inserting them via Object > Insert HTML as an alternative from the Muse forms, as those forms will have the lists, buttons, and checkboxes you're looking for.
    Another way if you are publishing your site to Business Catalyst, then you can create forms in BC admin section and copy the form html in Muse page which will render the from that you have created in BC in your Muse site page.
    More details :
    http://helpx.adobe.com/business-catalyst/using/create-insert-form.html
    Thanks,
    Sanjit

  • Tree view with editable cells?

    Hi,
    I have written a GTK+-2 based graphical visualizer for the NEC2 antenna simulation and analysis tool http://www.qsl.net/5b4az/pages/nec2.html and I am now considering a companion graphical editor for the NEC2 input file. This file is normally produced with a text editor and specifies antenna geometry and then commands to calculate various data regarding antenna characteristics (gain, input impedance etc).
    Luckily the original NEC2 was written in FORTRAN and the input was punched cards with a fixed format, so the current file format is line-based and with a fixed number of parameters per line: you can get an idea by looking into examples files in http://www.qsl.net/5b4az/pkg/nec2/examples/
    What I need is an idea on how to code a graphical line editor with editable cells for each parameter and the ability to add or delete lines as needed. The data in the cells may be numerical or textual or both and there may be inter-relations between cells, e.g. one cell may have a value that is a fixed proportion of another cell's value etc.
    Tips please? Thanks!

    tranquility wrote:
    Well, just about any language with bindings for gtk will work in a very similar manner. If I understand correctly, you might want to investigate the GTK treeview and GTK CellRenderer classes. Try to check the tutorials too.
    Hope this helps.
    Yes, thanks! Unfortunately though there is no easy way to have a spin button type editable cell, which would have been best for my needs. However, I found an example in a tutorial for the TreeView which could make a basis for a home brew second-best solution! 

  • CS3/CS4 - Tree view with dynamic height/width

    Hi,
    I have a resizable panel that contains a treeview, when the panel is resized the treeview resizes but I would also like the treeview nodes to adjust their width. For the record, -my treeview nodes contain static text widgets and images.
    Can I hook up some observers and manually resize the widgets when the panel resizes?
    Kind regards Toke

    If your node re-size needs are simple you may achieve it by setting e.g. kBindRight | kBindLeft on the appropriate widgets in the .fr file.  For a complex view I'd extend PalettePanelView to create your own implementations of Resize (adapting the widget widths in there) and perhaps ConstrainDimensions.
    Ian

  • How to hide a list from SharePoint tree view pro grammatically.

    Hi,
    I have enabled tree view for a SharePoint 2013 site pro grammatically. 
    I want hide some specific lists from that tree view like Documents, Workflow, Task List, Calender
    Lists which are created default when we create a site.
    How could i do that?

    I know how to hide Quick launch and Enable Tree view with properties in C#.
    My question is 
    hide some specific lists from that tree view like Documents,
    Workflow, Task List, Calender
    Lists which are created default when we create a site.

  • 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

Maybe you are looking for