Telerik Forums
UI for Blazor Forum
1 answer
7 views

Hi,

Is there a way to change the position of the small Arrow of the tooltip through css ?

 

thx!

Robert
Top achievements
Rank 1
Iron
 updated answer on 17 May 2022
1 answer
8 views

Hello,

I'm still trying to produce a reproducible scenario in Repl to share, but upgrading to 3.3.0 broke our treeview drop code. If I revert back to 3.2.0 it begins to work properly again.  I have a typical tree with several "folders" & "files" which I can drag and drop to re-organize. The only time telerik shows the circle with a slash drag hint is when you drag the source node over top itself. In 3.3.0 it seems that the circle with the slash is showing up over most but not all of the nodes in the tree. I can't explain why it thinks some areas are valid drop targets and others are not. One node is fine to drop on and the next and previous ones show the No Drop icon. 

I'll continue to try and make a Repl example but wanted to raise awareness of this sooner than later.

Thanks,

-Andy 

Andrew
Top achievements
Rank 1
Iron
Iron
 answered on 16 May 2022
1 answer
12 views

Hello

We have added validation to the Grid using Fluent Validation and this works perfectly. However in the validation we have to go to a back-end API to check if the value is not a duplicate.

The current behavior is that the Fluent Validation goes off whenever you type, this causes a lot of load on the API. Is there a way to change this? Maybe so it only occurs when you press the Save button, or when you leave the input field, or after x seconds of no typing...

Another valid option would be to do the check in the Update or Create Handler, but how do we display a nice error message that way to the user?

Thank you in advance

Thomas

 

Tsvetomir
Telerik team
 answered on 16 May 2022
1 answer
7 views

Opening the page it return this error on chrome console:

 

System.AggregateException: One or more errors occurred. (Could not load list of method overrides due to Method not found: System.Collections.Generic.IList`1<Microsoft.Extensions.Configuration.IConfigurationSource> Microsoft.Extensions.Configuration.IConfigurationBuilder.get_Sources())
 ---> System.TypeLoadException: Could not load list of method overrides due to Method not found: System.Collections.Generic.IList`1<Microsoft.Extensions.Configuration.IConfigurationSource> Microsoft.Extensions.Configuration.IConfigurationBuilder.get_Sources()
   at Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostBuilder.CreateDefault(String[] args)
   at BlazorRepl.Client.Program.Main(String[] args)
   --- End of inner exception stack trace ---
callEntryPoint @ blazor.webassembly.js:1
VM262:1 Uncaught ReferenceError: webVitals is not defined
    at <anonymous>:1:313
    at gtm.js?id=GTM-6X92:502:414
    at HTMLScriptElement.<anonymous> (gtm.js?id=GTM-6X92:503:118)

Dimo
Telerik team
 answered on 16 May 2022
1 answer
12 views

I have a grid defined with SelectionMode="GridSelectionMode.Single".  I'm handling the SelectedItemsChanged event and when returning the previously selected row is selected with the newly selected row.  This appears to be happening when an async call to a web api using http client is made.  If I comment out the http call the selection works as expected.

Can someone explain why the http client call could be impacting the selection functionality or how I may go about debugging this?


	

<div ><div ><label for="label">Labels</label><div ><TelerikGrid Data="@Labels" FilterMode="@GridFilterMode.FilterRow" ScrollMode="GridScrollMode.Scrollable" SelectionMode="GridSelectionMode.Single" SelectedItems="@SelectedLabels" SelectedItemsChanged="@((IEnumerable<LabelDto> labelList) => OnSelectAsync(labelList))" Height="200px"><GridColumns><GridColumn Field="@(nameof(LabelDto.Name))"></GridColumn></GridColumns></TelerikGrid></div></div></div> public partial class LabelSelection { private ObservableCollection<LabelDto>? _labels; private int? _selectedValue; public IEnumerable<LabelDto> SelectedLabels { get; set; } = Enumerable.Empty<LabelDto>(); protected async Task OnSelectAsync(IEnumerable<LabelDto> labels) { var l = labels.ToList(); SelectedLabels = l; if (l.Any()) await LabelChangedAsync(l[0]); StateHasChanged(); } ... } public async Task LabelChangeHandlerAsync(LabelDto label) { _currentLabel = label; var labelWithAttributes = await LabelRepo.GetLabelAsync((int)label.Id); //LabelAttributeList.Clear(); //if (labelWithAttributes.Attributes.Any()) //{ // LabelAttributeList.AddRange(labelWithAttributes.Attributes); //} }

 

        public async Task<LabelWithAttributesDto> GetLabelAsync(int id)
        {
            var req = $"labels/{id}?includeAttributes=true";

            _logger.Log(LogLevel.Warning, $"GetLabelsAsync({_client.BaseAddress}{req})...");

// The next call will cause multiple rows to be selected. Commenting this out will make the selections work.
           var apiResponse = await _client.GetStreamAsync(req);
//_logger.Log(LogLevel.Warning, $"...back from GetLabelsAsync({_client.BaseAddress}{req})");

//var label = await JsonSerializer.DeserializeAsync<LabelWithAttributesDto>
//    (apiResponse, new JsonSerializerOptions() { PropertyNameCaseInsensitive = true });

//return label;
return new LabelWithAttributesDto(1, "new", "filename", "100", new List<LabelAttributeDto>());
        }


Marin Bratanov
Telerik team
 answered on 15 May 2022
2 answers
346 views

I want to make a Custom GridCommandbutton Visible based on a value in the row.

For example, if the Status column of a row is 2, I want the command button to be visible, otherwise I want it hidde.

Is this possible?

 

Jay
Top achievements
Rank 1
Iron
 updated answer on 12 May 2022
0 answers
12 views

Started seeing errors after updated V.S.   Pages that uses TelerikGrid has these 2 errors.  It compiles fine and run fine, so i'm not sure how to fix.

Error (active) CS1503 Argument 2: cannot convert from 'Microsoft.AspNetCore.Components.EventCallback<System.Collections.Generic.IEnumerable<mymodel>>' to Microsoft.AspNetCore.Components.EventCallback'

Error (active) CS0246 The type or namespace name 'TItem' could not be found (are you missing a using directive or an assembly reference?)

 

Please advise
Thanks, ZB

Zack
Top achievements
Rank 1
 asked on 12 May 2022
18 answers
446 views

Hi Marin and happy new year!

I don't know if you can advise, but we've noticed that when selecting multiple rows of the grid (not using the checkbox), the selection seems to be noticeably slow. There seems to be quite a delay when clicking one or more rows (using shift in the latter case) and the highlight colour changing to show the selection.

Our grid is quite complex as we use RowTemplate and a manual datasource, but I notice that there is a similar albeit less pronounced delay in your demo. Any idea what might be causing this?

Kind Regards,
Nick.

<TelerikGrid Data=@Items TItem="Item" Sortable="true" Height="100%" Pageable=true OnRead="@ReadItems"
             PageSize=50 TotalCount=@Total class="viewgrid"
             SelectionMode=Telerik.Blazor.GridSelectionMode.Multiple
             @bind-SelectedItems="@SelectedItems">
    <RowTemplate Context="item">
        @foreach (var viewColumn in ViewDefinition.Columns)
        {
            <ViewGridColumn ViewColumn="@viewColumn" Item="@item" OnDoubleClick="@RowClicked" />
        }
 
    </RowTemplate>
    <GridColumns>
        @foreach (var viewColumn in ViewDefinition.Columns)
        {
            <GridColumn Title="@viewColumn.Label" Field="@viewColumn.FieldName" Width="@(viewColumn.Width + "px")"></GridColumn>
        }
    </GridColumns>
</TelerikGrid>


Stefano
Top achievements
Rank 1
Iron
 answered on 12 May 2022
1 answer
9 views

Hi all,

I'm having a hard time implementing a DateTime picker in a Grid. I'd like to set up the grid using the hierarchy feature and implement InCell editing. I created a version of my problem in the Telerik REPL and have observed the same issue in my current code.

 

https://blazorrepl.telerik.com/wmEfuDcn54Cv6ZNO07

 

As you can see, the DateTime picker works fine in the parent table. But when it is implemented in the child table, it seems that clicking on the DateTime picker actually takes the cell out of focus.

Does anyone know if there is a workaround or if this is a bug?

Thanks

 

Edit: I added the screenshots when I noticed that the REPL link wasn't loading correctly on my Chrome or Edge browser

Nadezhda Tacheva
Telerik team
 answered on 12 May 2022
6 answers
372 views
Is there currently a way to access filtered data from the grid? I want users to be able to filter data in the grid and then display it in a chart. The only way I can see to do it is by rolling my own filtering code with the OnRead event.
Greg
Top achievements
Rank 1
Iron
 answered on 11 May 2022
Top users last month
tar
Top achievements
Rank 2
Iron
Matthias
Top achievements
Rank 5
Bronze
Bronze
Iron
Shane
Top achievements
Rank 2
Iron
Iron
Daniel
Top achievements
Rank 3
Iron
Iron
Iron
SSirica
Top achievements
Rank 2
Iron
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?