If I have a grid inside a TelerikWindow, when I show the window allowing it to be draggable, there seems to be undesired behavior. In my environments, with 2.26.0, the TelerikWindow extends to the right of the screen and the draggable operation is impacted. I have the following code (very cut-down and simplified) as my Index.razor. If you click the button and start dragging the window around you should see what I am referring to.
@page "/"
<TelerikButton OnClick="@ShowModal">Show Modal</TelerikButton>
<TelerikWindow Modal="true" Draggable="true" @bind-Visible="@isModalVisible">
<WindowTitle>
<strong>Sample</strong>
</WindowTitle>
<WindowContent>
<TelerikGrid Data="@objectList" >
<GridColumns>
<GridColumn Field="@(nameof(SampleObject.Name))" Title="Name" />
<GridColumn Field="@(nameof(SampleObject.Description))" Title="Description" />
</GridColumns>
</TelerikGrid>
</WindowContent>
<WindowActions>
<WindowAction Name="Close" />
</WindowActions>
</TelerikWindow>
@code {
public bool isModalVisible = false;
public List<SampleObject> objectList = new();
protected override void OnInitialized()
{
objectList.Add(new SampleObject() { Name = "Object 1", Description = "description for object 1" });
objectList.Add(new SampleObject() { Name = "Object 2", Description = "description for object 2" });
}
public void ShowModal()
{
isModalVisible = true;
}
public class SampleObject
{
public string Name { get; set; }
public string Description { get; set; }
}
}