Is there a way to prevent the DetailRowTemplate from scrolling within the Master Grid? In the below example, I want to restrict the Detail from moving when scrolling in the Master Grid:
Razor<div style="width: 500px">
<DxGrid Data="DataSource"
ColumnResizeMode="GridColumnResizeMode.ColumnsContainer">
<Columns>
@for (int iCount = 1; iCount <= 10; iCount++)
{
<DxGridDataColumn Caption="@($"Column {iCount}")" Width="100px" />
}
</Columns>
<DetailRowTemplate>
<div style="width: 430px; background-color: red;">
<text>Don't Scroll</text>
</div>
</DetailRowTemplate>
</DxGrid>
</div>
@code
{
private string[] DataSource => [""];
}
Initial Render:
Scrolling the Grid:
Is there a way to prevent the Detail Template from moving? Thanks,
Mike
Hello Mike,
The DxGrid component does not have an API for this use case. Unfortunately, there are no workarounds to achieve this usage scenario either. Would you please elaborate on your requirements so we can offer you alternatives for it? We'll do our best to help.
Regards,
John
John,
My scenario is almost identical in design to the Master-Detail Row Preview demo, except backwards. In this demo there are only 4 columns in the master grid, but the detail is much larger and the user is unable to scroll the contents of the detail. I have the opposite scenario, where I have many columns (18) in the master grid, but can fit the entire contents of the detail within the bounds of the container, and when the user scrolls the master's columns, the detail is scrolled off-screen. I'm looking for a way to have the detail not move (or some kind of effect where it's always centered to the width of the grid). Thanks,
Mike