Scrollbar not appearing on refreshed C1FlexGrid

Posted by: cnickerson on 13 August 2025, 5:58 pm EST

    • Post Options:
    • Link

    Posted 13 August 2025, 5:58 pm EST

    Hello,

    I am trying to create a C1FlexGrid instead of a C1-Popup that displays details about the selected row inside the new flex grid. I am able to get the pop-up to appear and the data to be loaded, however, it doesn’t seem to display a scroll bar… My primary grid loads fine with a scroll bar, but this dynamic grid that is loaded when I refresh does not.

    My assumption is that just doing a refresh of the grid doesn’t tell C1FlexGrid to recalculate total row height of the grid, because if I load the grid with data from the beginning, it shows a scroll bar. However, I’m not sure what I need to add to do this. Any help you can provide would be helpful.

    Here is my code:

    <script>
    c1.documentReady(function(){
    	var fgMainGrid = wijmo.Control.getControl("#fgMainGrid");
    
    	fgMainGrid.addEventListener(fgMainGrid.hostElement, 'click', function (e) {
    		var ht = fgMainGrid.hitTest(e);
    		if (ht.panel.columns[ht.col].binding == 'HasSubGrid' && ht.panel != fgMainGrid.columnHeaders) 
    		{
        			displaySubGrid();
    		}
    	});
    });
    
    function displaySubGrid() {
    	var fgMainGrid = wijmo.Control.getControl('#fgMainGrid');
            var popSubGrid= wijmo.Control.getControl('#popSubGrid');
            var fgSubGrid= wijmo.Control.getControl('#fgSubGrid');
            var cvSubGrid= fgSubGrid.collectionView;
    
            cvSubGrid.refresh();
    
    	popSubGrid.show(true, function(e) {
    		fgMainGrid.focus();
    	});
    }
    
    function getMainGridData() {
    	var fgMainGrid = wijmo.Control.getControl("#fgMainGrid");
    
    	if (e.extraRequestData == null) {
    		e.extraRequestData = {};
    	}
    
    	if (fgMainGrid) {
    		var currentItem = fgMainGrid.collectionView.currentItem;
    		e.extraRequestData["MainGridID"] = currentItem ? currentItem.MainGridID: "";
    	}
    }
    </script>
    
    <c1-popup class="modal-content" id="popSubGrid" width="95%" height="90vh" hide-trigger="BlurPopup">
    	<c1-flex-grid id="fgSubGrid" auto-generate-columns="false" height="50vh" width="100%">
    		<c1-flex-grid-column header="Employee ID" binding="EmployeeID"></c1-flex-grid-column>
    		<c1-flex-grid-column header="Name" binding="Name"></c1-flex-grid-column>
    		<c1-items-source read-action-url="@Url.Action("fgSubGrid_Read")" query-data="getMainGridData" />
    </c1-flex-grid>
    </c1-popup>
  • Posted 14 August 2025, 9:42 am EST

    Hello,

    We’re working on your requirement and will get back to you once it’s complete.

    Regards,

    Uttkarsh.

  • Posted 14 August 2025, 11:24 am EST

    Thank you for taking the time to help me out.

    For extra info, I am using ASP.NET Core Controls version 2024v1(360)

  • Posted 18 August 2025, 6:24 am EST

    Hello,

    Thank you for confirming the version. We were able to reproduce the behavior with the one you mentioned.

    In the latest release, the scrollbar is shown by default, so upgrading your project to the latest version would resolve this issue.

    However, if you want to use the older version instead, please add the scrollbars manually using CSS as follows.

    #fgSubGrid [wj-part="root"] {
        overflow-y: scroll !important;
    }

    Please check the attached sample (FlexGrid_DetailGrid.zip), which demonstrates the implementation.

    Kindly note that we used the 362 version for this sample since there are some known issues with the 360 and 361 versions.

    Regards,

    Uttkarsh.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels