Telerik Forums
UI for Blazor Forum
1 answer
90 views

Using the approach in the example code of "OneNotificationPerApp" works great for non-modal forms.   However, modal forms that use this approach do show the notfication but its in the background,  not easily visible.  Is there a way to change that?  I tried chaning the z order to a high number but that didn't work.  Any suggestions would be great.  Thanks in advance!

Let me know if you need to see the code and I can zip it up and attach it.

https://github.com/telerik/blazor-ui/tree/master/notification/single-instance-per-app

 

Dimo
Telerik team
 updated answer on 18 Mar 2024
1 answer
76 views

Hi

Please could you share how you plan to support Blazor SSR mode? Do you intend to make as many components as possible SSR compatible? Do you envisage you will add interactivity to the components in SSR by using JavaScript?

Thanks

George

Dimo
Telerik team
 updated answer on 15 Mar 2024
1 answer
20 views

Hi,

I have a situation where I want a button to be part of form which triggers a dialog to open on top so the user can choose an image via the filemanager component. Once selected I'll handle the binding to the form item to populate the details required for the form.

However, when I have the button inside the form, and the user clicks it, the OnInvalidSubmit event is immediately triggered because the focus has now shifted to the dialog.

Is there a  way to disable this behavior? I would like the validation to only happen once the save button is pressed in this case.

Thanks!

Nadezhda Tacheva
Telerik team
 answered on 14 Mar 2024
1 answer
19 views

Is it possible to specify the QRcode size in other units than pixels?
If I set Size="10vw"  then the surrounding div scales correctly, but the inner div has a with and height of 10px, and the QR code is empty.
It seems to me that the unit is ignored and only the numbers are used as a size in pixels.

Is there a way to make the QR image scalable?

Kind regards,

Kees Alderliesten

Nadezhda Tacheva
Telerik team
 updated answer on 14 Mar 2024
1 answer
45 views

My requirements:

  • Ability for user to add shapes (rectangle, square, circle) or image to a map.
  • Ability for the user to move that shape around on a map (drag and drop).
  • Ability for the user to save all the placed shape geolocations.
  • Ability to read the saved shape geolocations and place them on the map.

I did a little research on your Map control and it does seem to support layers and a specific layer  type called "shape".  However, when I look at the code sample I don't see any way to define the shape (circle, rectangle, etc.) nor provide dimensions for the shape (L X W) nor have a bitmap/image as a shape?

I also didn't see any drag and drop support?

Could I get answers to these questions and/or point me to documentation that supports my requirements?

Cheers, Rob.

Dimo
Telerik team
 answered on 13 Mar 2024
1 answer
26 views

Date Picker UI component is unresponsive. The calendar drop down does not work and masking is not being applied. I followed the instructions on First Steps with UI for Blazor in a Web App - Telerik UI for Blazor I have the nuget package set up, I have the scripts in, I followed the instructions and double checked that I followed all of them. I can't figure out why this ui component is not working.

 

@page "/datePicker"
@attribute [StreamRendering]

<PageTitle>Telerik DatePicker</PageTitle>


The selected date is: @datePickerValue.ToShortDateString()
<br />

<TelerikDatePicker @bind-Value="datePickerValue"
                   Format="dd MMMM yyyy"
                   Min="@Min" Max="@Max">
</TelerikDatePicker>

@code {
    DateTime datePickerValue { get; set; } = DateTime.Now;
    public DateTime Min = new DateTime(1990, 1, 1, 8, 15, 0);
    public DateTime Max = new DateTime(2025, 1, 1, 19, 30, 45);
}

 

Dimo
Telerik team
 answered on 13 Mar 2024
1 answer
21 views
How can I change the indentation of the child items in hierarchical grids. I want the children to start at the same beginning as the parent element
Dimo
Telerik team
 answered on 12 Mar 2024
1 answer
42 views

Hi,

I'm attempting to do something that is probably dumb/unsupported. We have a paginated grid in our UI that we want to include a joined model in.

Example:


public class Item
{
   [Key]
   public Guid ItemId{ get; set; } = Guid.NewGuid();
   public Guid? LatestLogId { get; set; }
}

public class ItemLog
{
   [Key] 
   public Guid ItemLogId{ get; set; }
   
   public Guid ItemId{ get; set; }
   [ForeignKey("ItemId")]
   public Item? Item { get; set; }

   [MaxLength(250)] public string Message { get; set; } = null!;
}


We use 'LatestLogId' in order to know what ItemLog to 'include' in the results in the UI

I'm trying to project it into a Dto that includes both the Item and the LatestLog but running into some trouble calling 'ToDataSourceResultAsync' with that IQueryable<Dto>


 public async Task<DataSourceResult> GetItemReportPage(DataSourceRequest pageRequest, Guid staffId,
        bool includeAll = false)
    {
            var baseQuery = _appContext.Items
                .AsQueryable();
            if (!includeAll)
            {
                baseQuery = baseQuery.Where(x => x.CreatedBy== staffId);
            }
                var query= baseQuery.Select(item => new ItemWithLatestLogDto
                    {
                        LatestLog = _appContext.ItemLogs.FirstOrDefault(x => x.ItemLogId== request.LatestLogId) 
                    })
                    .AsNoTracking();


        var dataSourceResult = await query.ToDataSourceResultAsync(pageRequest);
        return dataSourceResult;
    }


When calling that I get an error that is something like this:


System.InvalidOperationException: The LINQ expression 'DbSet<Item>()
    .Where(n => n.CreatedById== __staffId_0)
    .OrderByDescending(n => new ItemWithLatestLogDto{ LatestLog = DbSet<ItemLog>()
            .Where(r => (Guid?)r.ItemLogId== n.LatestLogId)
            .FirstOrDefault() }
    .CreatedDateTimeUtc)' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to 'AsEnumerable', 'AsAsyncEnumerable', 'ToList', or 'ToListAsync'. See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.
   at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.<VisitMethodCall>g__CheckTranslated|15_0(ShapedQueryExpression translated, <>c__DisplayClass15_0&)
   at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
   at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
   at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
   at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
   at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
   at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
   at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
   at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
   at Microsoft.EntityFrameworkCore.Query.QueryCompilationContext.CreateQueryExecutor[TResult](Expression query)
   at Microsoft.EntityFrameworkCore.Storage.Database.CompileQuery[TResult](Expression query, Boolean async)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.CompileQueryCore[TResult](IDatabase database, Expression query, IModel model, Boolean async)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass9_0`1.<Execute>b__0()
   at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQuery[TResult](Object cacheKey, Func`1 compiler)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query)
   at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.Execute[TResult](Expression expression)
   at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable`1.System.Collections.IEnumerable.GetEnumerator()
   at Telerik.DataSource.Extensions.QueryableExtensions.Execute[TModel,TResult](IQueryable source, Func`2 selector)
   at Telerik.DataSource.Extensions.QueryableExtensions.CreateDataSourceResult[TModel,TResult](IQueryable queryable, DataSourceRequest request, Func`2 selector)
   at Telerik.DataSource.Extensions.QueryableExtensions.ToDataSourceResult(IQueryable queryable, DataSourceRequest request)

The Dto looks like this:

public class ItemWithLatestLogDto: Item
{
    public ItemLog? LatestLog { get; set; } 
 
    public NewFileRequestWithLatestLogDto()
    {
    }
}



Is this a use-case supported by the method or do I need to find a different way of accomplishing this?

Thanks!



Svetoslav Dimitrov
Telerik team
 answered on 11 Mar 2024
1 answer
26 views
I need to know when the grid has been rendered. Is there a way?
Hristian Stefanov
Telerik team
 answered on 11 Mar 2024
2 answers
52 views

Hy,

In my application I had to insert the localization with the default Italian language.

I followed the points explained in this link step by step: Blazor Localization - Telerik UI for Blazor

Inside my application I therefore have a Resources folder with the following files inside:
TelerikMessages.resx and TelerikMessages.it-IT.resx (set as default on Program.cs).

My problem is the following: in debug the localization for the DateTimePicker or NumericTextBox components works correctly showing me the date and number formats in Italian with the related translated texts.

However, once I insert my application into a docker container, the localization seems to have no effect, showing both components in English language and format.

My Resources Folder:

However, localization for the Grid component works correctly in both cases.

Attached is the behavior of the date picker in debug mode and inside a docker container.

Can anyone give me a solution without using the Format property of the components but using localization? My application is in Dotnet 8

Thanks.

Marco
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 11 Mar 2024
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?