When a Dialog is shown from a modal Window, the Dialog appears behind the Window on second opening.
Here is a test page with a workaround:
@inject IJSRuntime js
<TelerikButton OnClick="@( () => WindowVisible = true )">Show Window</TelerikButton>
<TelerikWindow @bind-Visible="@WindowVisible"
Modal="true">
<WindowActions>
<WindowAction Name="Minimize" />
<WindowAction Name="Close" />
</WindowActions>
<WindowTitle>
Window Title
</WindowTitle>
<WindowContent>
<p>Window Content</p>
<TelerikButton OnClick="@OnShowDialogButtonClick">Show Dialog</TelerikButton>
</WindowContent>
</TelerikWindow>
<TelerikDialog @bind-Visible="@DialogVisible"
Width="300px"
Class="dialog-on-window">
<DialogTitle>
Dialog Title
</DialogTitle>
<DialogContent>
<p>Dialog Content</p>
</DialogContent>
<DialogButtons>
<TelerikButton OnClick="@( () => OnDialogButtonClick(true) )">OK</TelerikButton>
</DialogButtons>
</TelerikDialog>
<script suppress-error="BL9992">
function bringDialogToTop() {
var dialogWrapper = document.querySelector(".dialog-on-window").closest(".k-dialog-wrapper");
if (dialogWrapper) {
dialogWrapper.style.zIndex = parseInt(dialogWrapper.style.zIndex) + 2;
}
}
</script>
@code {
private bool WindowVisible { get; set; }
private bool DialogVisible { get; set; }
private bool ShouldFocusDialog { get; set; }
private void OnShowDialogButtonClick()
{
DialogVisible = true;
ShouldFocusDialog = true;
}
private void OnDialogButtonClick(bool result)
{
DialogVisible = false;
}
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (ShouldFocusDialog)
{
ShouldFocusDialog = false;
await Task.Delay(1);
await js.InvokeVoidAsync("bringDialogToTop");
}
await base.OnAfterRenderAsync(firstRender);
}
}
Currently, if a sub-menu is opened and the user moves the mouse back to a different parent item, the whole menu is closed.
Video: https://app.screencast.com/rcdHp9oklAU4z
Reproduction: https://blazorrepl.telerik.com/mxuClvaB36CB47v425
===
ADMIN EDIT
===
This bug also affects the ContextMenu component.
When the Grid is databound via OnRead event, the initially displayed aggregates are wrong and take into account the first page only.
A possible workaround is to bind the Grid in OnAfterRenderAsync -
@using Telerik.DataSource
@using Telerik.DataSource.Extensions
<TelerikGrid @ref="@GridRef"
OnRead="@OnGridRead"
TItem="@Product"
Pageable="true">
<GridAggregates>
<GridAggregate Field="@nameof(Product.Name)" Aggregate="@GridAggregateType.Count" FieldType="@(typeof(System.String))" />
</GridAggregates>
<GridColumns>
<GridColumn Field="@nameof(Product.Name)" Title="Product Name">
<FooterTemplate>
@context.Count
</FooterTemplate>
</GridColumn>
<GridColumn Field="@nameof(Product.Price)" />
<GridColumn Field="@nameof(Product.ReleaseDate)" Title="Release Date" />
<GridColumn Field="@nameof(Product.Active)" />
</GridColumns>
</TelerikGrid>
@code {
TelerikGrid<Product> GridRef { get; set; }
List<Product> GridData { get; set; }
bool ShouldBindGrid { get; set; }
async Task OnGridRead(GridReadEventArgs args)
{
if (!ShouldBindGrid)
{
return;
}
await Task.Delay(200); // simulate network delay
DataSourceResult result = GridData.ToDataSourceResult(args.Request);
args.Data = result.Data;
args.Total = result.Total;
args.AggregateResults = result.AggregateResults;
}
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
// workaround for initial Grid aggregates
ShouldBindGrid = true;
GridRef.Rebind();
StateHasChanged();
}
}
protected override void OnInitialized()
{
GridData = new List<Product>();
var rnd = new Random();
for (int i = 1; i <= 50; i++)
{
GridData.Add(new Product()
{
Id = i,
Name = "Product " + i.ToString(),
Price = (decimal)rnd.Next(1, 100),
ReleaseDate = DateTime.Now.AddDays(-rnd.Next(60, 1000)),
Active = i % 3 == 0
});
}
}
public class Product
{
public int Id { get; set; }
public string Name { get; set; }
public decimal Price { get; set; }
public DateTime ReleaseDate { get; set; }
public bool Active { get; set; }
}
}
Please add a feature to export the grid to a PDF file.
---
ADMIN EDIT
We have made two examples you can use for the time being to get a PDF document from the grid:
---
If I group by a column, and one of the values in the column contains a forward slash ( '/'), then the value will not be grouped, the Grid ignores it.
The issue seems to occur only when LoadGroupsOnDemand is set to true.
===
ADMIN EDIT
===
A possible option for the time being is to disable the LoadGroupsOnDemand feature.
I have recently downloaded the latest Telerik.UI for blazor 5.0.1
commercial and I tried converting a dotnet 8 project to a telerik
project using the context menu but the wizard says it can't be converted.
The Tooltip Template of the Gantt behaves strangely in a WASM application. It flickers and does not display any information. Reproduction in REPL which is essentially a WASM app: https://blazorrepl.telerik.com/QQFEapOg56MCIhIK48.
The issue is not reproducible in a server-side application using the same code.