show grid data in treeview

show grid data in treeview

neluruneluru Posts: 2Questions: 1Answers: 0

we are using bento ui and dataTable to bind the grid, now we want to show the grid data in treeview structure like parent child
can we achieve this using datatable.

we are binding the data using json

kindly help me in resolving this issue

Answers

  • mRendermRender Posts: 151Questions: 26Answers: 13

    Can you post your code so we can help? Otherwise, we'll just point you to the child data page.

  • neluruneluru Posts: 2Questions: 1Answers: 0

    hi, we are getting json data and parsing the json and
    if (result != null) { //try checking for JSON length also -- need to implement
    var jsonData = $.parseJSON(result);

            sToken = jsonData.Token;
            $('#myTable').dataTable().fnDestroy();
            $('#myTable').dataTable(
                {
                    "data": jsonData.ListData,
                    "bFilter": false,
                    "bLengthChange": false,
                    "scrollY": "520px",
                    "bPaginate": false,
                    "bInfo": true,
                    "bSortClasses": false,
                    "bAutoWidth": false,
                    "language":
                        {
                            "emptyTable": "No Records Found."
                        },
                    "order": [[2, 'asc']],
                    "columns": [
                        { "visible": false, "data": "t_id", "width": "5%" },
                        { "visible": false, "data": "parent_id", "width": "5%", "defaultContent": "" },
                        { "data": "t_type", "defaultContent": "" },
                        { "data": "t_name", "defaultContent": "" },
                        { "data": "Version", "defaultContent": "" },
                        { "data": "t_status", "defaultContent": "" },
                        { "data": "CheckedoutBy", "defaultContent": "" },
                        { "visible": false, "data": "CheckoutID", "defaultContent": "" },
                        { "visible": false, "data": "is_template_available", "defaultContent": "" },
                        { "visible": false, "data": "isArchived", "defaultContent": "" }
                    ]
    
                });
    

    }

This discussion has been closed.