barra vertical

scrol vertical como sacarlos en un treegrid de syncfunsion

3 Replies

JS Jonesherine Stephen Syncfusion Team November 29, 2016 06:13 PM UTC

Hi Carlos, 
Thanks for contacting Syncfusion support 
At present there is no support to enable/disable the vertical scroller in TreeGrid. But we have prepared the work around and updated the TreeGrid height on add/delete/expand/collapse action by using create, collapsed, expanded, actionComplete events. 
Please find the code example below: 
    @(Html.EJ().TreeGrid("TreeGridContainer")                      
          .ClientSideEvents(eve => 
              { 
                  eve.ActionComplete("actionComplete"); 
                  eve.Create("create"); 
                  eve.Expanded("expanded"); 
                  eve.Collapsed("collapsed"); 
                  eve.RowSelected("rowSelected"); 
              }) 
    ) 
    @(Html.EJ().ScriptManager()) 
    <script> 
        function create(args) { 
            //To update the height of TreeGrid during load time 
            updateTreeHeight(); 
        } 
        function collapsed(args) { 
            //To update the height of TreeGrid during collapse action 
            updateTreeHeight(); 
        } 
        function expanded(args) { 
           //To update the height of TreeGrid during expand action 
            updateTreeHeight(); 
        } 
        function rowSelected(args) { 
          //To update the height of TreeGrid while adding any row  
            updateTreeHeight(); 
        } 
        function actionComplete(args) { 
           //To update the height of TreeGrid while saving the newly added row and deleting the existing row 
            if (args.requestType == "addNewRow" || args.requestType == "delete") { 
                updateTreeHeight(); 
            } 
        } 
        function updateTreeHeight() { 
            var tree = $("#TreeGridContainer").ejTreeGrid("instance"), 
            toolbar = $("#TreeGridContainer_toolbarItems").height(), 
            model = tree.model, 
            totalLen = tree.getExpandedRecords(model.updatedRecords); 
            //To calculate the height of TreeGrid as per records count 
            var height = model.rowHeight * totalLen.length + tree.getHeaderContent().height() + toolbar+4; 
            //Update height using setModel 
            var sizesettings = { height: height.toString() }; 
            tree.setModel({ "sizeSettings": sizesettings }); 
        } 
    </script> 
 We have also prepared the sample for your reference. Please find the sample from below location 
 
Regards 
Jone sherine P S 



CA carlos December 1, 2016 05:10 PM UTC

Hola en el treegrid no se me activan los clics en las flechitas hacia abajo (TreeColumnIndex), quiere desplasar uno a uno espero y me ayuden gracias


JS Jonesherine Stephen Syncfusion Team December 2, 2016 05:01 PM UTC

Hi Carlos, 
By using “enableCollapseAll” property we can render the TreeGrid with all row collapsed during load time. 
Please find the code example below: 
@(Html.EJ().TreeGrid("TreeGridContainer") 
.EnableCollapseAll(true) 
) 
We have also prepared the sample for your reference. Please find the sample below location: 
Is this requirement if not please share us more details related to your query. It would be helpful for us to serve you better 
Regards, 
Jone sherine P S 


Loader.
Up arrow icon