Gridcontrol - Mouse scroll in embedded grid in cell

Hi,

I have one main Gridcontrol and some cells have embebed grid. When I scroll over main grid it works fine but I would like to scroll GridInCell when over it.

Is this possible?

Thanks


8 Replies

EE Elavazhagan Elangovan Syncfusion Team September 17, 2025 05:51 PM UTC

Hi Dinis Ferreira,


Thank you for your query and for sharing the details regarding the scrolling behavior in your GridControl setup.


Based on the information provided, we understand that the main GridControl scrolls as expected. However, you would like the embedded grid (GridInCell) to scroll when the mouse is hovered over it. We reviewed your scenario and attempted to replicate the issue, but we were unable to reproduce the behavior you described.


In GridControl, the embedded grid does not scroll initially. Scrolling is enabled only for the main grid. Once the embedded grid is clicked, scrolling becomes active for it, and you can then scroll the embedded grid by simply hovering the mouse over it.


To assist you further, we have attached a sample and a video demonstration for your reference. Kindly review them and let us know your observations.


To help us better understand and resolve the issue, we kindly request the following additional details:

  • Customizations: Have you applied any custom scrolling behavior or modifications? If so, please share the details.
  • Modified Sample: Please update the attached sample to reproduce the issue on your end and share the modified version with us.
  •  

Providing these details will help us better understand the issue and offer a more accurate and effective solution.


Regards,
Elavazhagan E


Attachment: GridControl_2839ef51.zip


DF Dinis Ferreira replied to Elavazhagan Elangovan September 18, 2025 09:09 AM UTC

Hi  Elavazhagan

Your example is correct. Also when scroll with click on cell with embedded main grid grid scroll some times.
Im interested in scroll the embedded grid without click on cell. If mouse is over main grid this makes main grid scroll, if mouse is over cell with embedded grid then scroll is applied to embedded grid.
Is this possible?

Thanks



SB Sweatha Bharathi Syncfusion Team September 19, 2025 01:34 PM UTC

Dinis Ferreira,
 
We have checked the reported issue “When using CellEmbeddedGrid, mouse scrolling does not work for embedded gridcontrol while mouse is over cell” on our end and it is confirmed as a defect. And We have logged a bug. We will fix this issue and include it in our NuGet release Which is scheduled on October 14, 2025.
You can track the status of this report through the following feedback link,
 
 
Note: The provided feedback link is private, and you need to log in to view this feedback.
 
We will let you know once it is released. We appreciate your patience until then.
Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.


DF Dinis Ferreira replied to Sweatha Bharathi September 19, 2025 01:41 PM UTC

Thanks



SB Sweatha Bharathi Syncfusion Team October 14, 2025 12:13 PM UTC

Dinis Ferreira,

We apologize for the inconvenience. Unfortunately, the fix for this issue was not included today as promised.
While we have partially addressed the reported case, the full resolution requires additional time due to its complexity. As a result, the complete fix is scheduled to be included in the first NuGet release following the Volume 3 SP1 release.
Thank you for your patience and understanding.

If you have any questions or concerns, please feel free to reach out.



SB Sweatha Bharathi Syncfusion Team October 16, 2025 01:02 PM UTC

Dinis Ferreira,


We have analyzed the reported issue and implemented a sample-level solution. This approach enables embedded grids to scroll when hovered by detecting the mouse position and redirecting the scroll event to the appropriate child grid. Specifically, we’ve used the CellMouseHover event to activate the cell containing the embedded grid, and the VScrollPixelPosChanging event to intercept the scroll and apply it to the embedded grid’s scrollbar. This ensures smooth and intuitive scrolling behavior for nested grids.


We have attached a simple sample and code snippet for your reference. Please review it and feel free to contact us if you have any further questions.

 

Code Snippet to enable the mouse scrolling for EmbeddedGrid:

public Form1()

{

    InitializeComponent();

    gridControl1.VScrollPixel = true;

    EmbeddedGrid.VScrollPixel = true;

}

private int ParentGridScrollBarValue;

private void EmbeddedGrid_MouseHover(object sender, EventArgs e)

{

    ParentGridScrollBarValue = gridControl1.VScrollBar.Value;

}

private void GridControl1_VScrollPixelPosChanging(object sender, GridScrollPositionChangingEventArgs e)

{

    GridControl grid = sender as GridControl;

    Point clientPt = grid.PointToClient(Control.MousePosition);

    if (grid.PointToRowCol(clientPt, out int row, out int col, -1))

    {

        var covered = grid.CoveredRanges?.FindRange(row, col);

        if (covered != null && grid.CoveredRanges.Count > 0) { row = covered.Top; col = covered.Left; }

        GridControl target = grid[row, col].Control as GridControl;

        if (target != null && target.IsHandleCreated && target.Visible && target.VScroll)

        {

            gridControl1.VScrollBar.Value = ParentGridScrollBarValue;

            e.Cancel = true;

        }

    }

}

private void GridControl1_CellMouseHover(object sender, GridCellMouseEventArgs e)

{

    GridControl grid = sender as GridControl;

    if (grid[e.RowIndex, e.ColIndex].Control is CellEmbeddedGrid)

        grid.CurrentCell.MoveTo(e.RowIndex, e.ColIndex);

}


Attachment: MouseHover_cd389edc.zip


DF Dinis Ferreira October 17, 2025 07:32 AM UTC

Hi

This works good.


Thank you



SB Sweatha Bharathi Syncfusion Team October 17, 2025 08:45 AM UTC

Dinis Ferreira,

Glad that your issue is resolved! Please get back to us if you need any further assistance, we will be happy to help you.


Loader.
Up arrow icon