Telerik Forums
UI for Blazor Forum
1 answer
176 views

Hi Telerik Team

After several attempts to clear up the nuget feed and install the Telerik UI for Blazor I am writing to you.

I am getting the following login failed message. I have tried with both encrypted and plain-text password in the nuget.config file.

[nuget.telerik.com] The V2 feed at 'https://nuget.telerik.com/nuget/Search()?$filter=IsLatestVersion&searchTerm=''&targetFramework='net5.0'&includePrerelease=false&$skip=0&$top=26&semVerLevel=2.0.0' returned an unexpected status code '401 Logon failed.'.

The nuget.config file looks as below

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.telerik.com" value="https://nuget.telerik.com/nuget" />
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
  </packageSources>
  <packageRestore>
    <add key="enabled" value="True" />
    <add key="automatic" value="True" />
  </packageRestore>
  <bindingRedirects>
    <add key="skip" value="False" />
  </bindingRedirects>
  <packageManagement>
    <add key="format" value="0" />
    <add key="disabled" value="False" />
  </packageManagement>
  <packageSourceCredentials>
    <nuget.telerik.com>
      <add key="Username" value=<username> />
      <add key="Password" value=<password> />
    </nuget.telerik.com>
  </packageSourceCredentials>
</configuration>

 

Looking forward to your help!

Marin Bratanov
Telerik team
 answered on 03 Sep 2021
1 answer
469 views

Hi,

I am using Telerik UI for Blazor 2.25.0 in a Blazor Server project. I am trying to add a delete confirmation dialog to my grid by using the following documentation: https://docs.telerik.com/blazor-ui/components/treelist/editing/built-in-dialogs/delete-confirmation. However, there doesn't seem to be a ConfirmDelete parameter available.

<TelerikGrid Data="@GridDataArtists" @ref="@Grid" Height="460px" RowHeight="60" PageSize="10" Pageable="true"
                 Sortable="true" Resizable="true" FilterMode="@GridFilterMode.FilterRow" OnRead="@ReadArtists"
                 OnStateInit="@((GridStateEventArgs<Artist> args) => OnStateInitHandler(args))"
                 OnStateChanged="@((GridStateEventArgs<Artist> args) => OnStateChangedHandler(args))"
                 TotalCount="@TotalArtists" EditMode="GridEditMode.Popup" OnCreate="@CreateHandler"
                 OnDelete="DeleteHandler" ConfirmDelete="true">

The above code doesn't compile because it cannot find ConfirmDelete:

Unhandled exception rendering component: Object of type 'Telerik.Blazor.Components.TelerikGrid`1[[MusicApp.Core.Artist, MusicApp.Core, Version=1.0.0.0, Cult
ure=neutral, PublicKeyToken=null]]' does not have a property matching the name 'ConfirmDelete'.
Am I not using the correct version?
Matthias
Top achievements
Rank 5
Bronze
Bronze
Iron
 updated answer on 03 Sep 2021
2 answers
1.0K+ views

Is there an example where the TelerikNotification component is used more like a service, similar to the MessageBox callback example?

I would like to be able to raise notifications from my view models and not have to either raise an event for the view to handle, or pass the TelerikNotification instance down to the view model.

thanks

-marc

Hristian Stefanov
Telerik team
 answered on 03 Sep 2021
2 answers
368 views

Hello.

I am testing the widgets and I see that these, in general, use non-scalable units. Consequently what I am doing is overwriting the CSS applied to these to get a responsiveness site. This takes quite a bit of time which is why I ask you if there is a relatively simple way to scale the font size of the components based on the viewport size?

Regards,

Blazorist
Top achievements
Rank 2
Bronze
Iron
Iron
 answered on 02 Sep 2021
1 answer
87 views
If I have two grids and one of them is nested, if I set pageable to true, it doesn't work.  Any suggestions?
Marin Bratanov
Telerik team
 answered on 01 Sep 2021
2 answers
1.6K+ views

Hello everyone,

I have a TelerikTreeList inside a EditForm. When the page is loaded the first time everything works as expected. When reloading the page the TreeList fails with System.ObjectDisposedException: Cannot access a disposed object.

Here is the whole error message:

 

System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'DotNetObjectReference`1'.
   at Microsoft.JSInterop.DotNetObjectReference`1.ThrowIfDisposed()
   at Microsoft.JSInterop.JSRuntime.TrackObjectReference[TValue](DotNetObjectReference`1 dotNetObjectReference)
   at Microsoft.JSInterop.Infrastructure.DotNetObjectReferenceJsonConverter`1.Write(Utf8JsonWriter writer, DotNetObjectReference`1 value, JsonSerializerOptions options)
   at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.TryWriteAsObject(Utf8JsonWriter writer, Object value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.Converters.DictionaryOfTKeyTValueConverter`3.OnWriteResume(Utf8JsonWriter writer, TCollection value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.Converters.DictionaryDefaultConverter`3.OnTryWrite(Utf8JsonWriter writer, TCollection dictionary, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.TryWriteAsObject(Utf8JsonWriter writer, Object value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.Converters.ArrayConverter`2.OnWriteResume(Utf8JsonWriter writer, TCollection value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.Converters.IEnumerableDefaultConverter`2.OnTryWrite(Utf8JsonWriter writer, TCollection value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.WriteCore(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.JsonSerializer.WriteCore[TValue](JsonConverter jsonConverter, Utf8JsonWriter writer, TValue& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.JsonSerializer.WriteCore[TValue](Utf8JsonWriter writer, TValue& value, Type inputType, JsonSerializerOptions options)
   at System.Text.Json.JsonSerializer.Serialize[TValue](TValue& value, Type inputType, JsonSerializerOptions options)
   at System.Text.Json.JsonSerializer.Serialize[TValue](TValue value, JsonSerializerOptions options)
   at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](String identifier, CancellationToken cancellationToken, Object[] args)
   at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, CancellationToken cancellationToken, Object[] args)
   at Telerik.Blazor.Components.TreeList.TreeListHeaderRow`1.InitColumnReorderable()
   at Telerik.Blazor.Components.TreeList.TreeListHeaderRow`1.OnAfterRenderAsync(Boolean firstRender)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)
DEBUG Received hub invocation: InvocationMessage { InvocationId: "", Target: "OnRenderCompleted", Arguments: [ 3,  ], StreamIds: [  ] }.
ERROR Unhandled exception in circuit 'FJaH7LK7_TFBNO0Iti401Oi6ChhUWppLVwtrSUgHQ-A'.
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'DotNetObjectReference`1'.
   at Microsoft.JSInterop.DotNetObjectReference`1.ThrowIfDisposed()
   at Microsoft.JSInterop.JSRuntime.TrackObjectReference[TValue](DotNetObjectReference`1 dotNetObjectReference)
   at Microsoft.JSInterop.Infrastructure.DotNetObjectReferenceJsonConverter`1.Write(Utf8JsonWriter writer, DotNetObjectReference`1 value, JsonSerializerOptions options)
   at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.TryWriteAsObject(Utf8JsonWriter writer, Object value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.Converters.DictionaryOfTKeyTValueConverter`3.OnWriteResume(Utf8JsonWriter writer, TCollection value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.Converters.DictionaryDefaultConverter`3.OnTryWrite(Utf8JsonWriter writer, TCollection dictionary, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.TryWriteAsObject(Utf8JsonWriter writer, Object value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.Converters.ArrayConverter`2.OnWriteResume(Utf8JsonWriter writer, TCollection value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.Converters.IEnumerableDefaultConverter`2.OnTryWrite(Utf8JsonWriter writer, TCollection value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.WriteCore(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.JsonSerializer.WriteCore[TValue](JsonConverter jsonConverter, Utf8JsonWriter writer, TValue& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.JsonSerializer.WriteCore[TValue](Utf8JsonWriter writer, TValue& value, Type inputType, JsonSerializerOptions options)
   at System.Text.Json.JsonSerializer.Serialize[TValue](TValue& value, Type inputType, JsonSerializerOptions options)
   at System.Text.Json.JsonSerializer.Serialize[TValue](TValue value, JsonSerializerOptions options)
   at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](String identifier, CancellationToken cancellationToken, Object[] args)
   at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, CancellationToken cancellationToken, Object[] args)
   at Telerik.Blazor.Components.TreeList.TreeListHeaderRow`1.InitColumnReorderable()
   at Telerik.Blazor.Components.TreeList.TreeListHeaderRow`1.OnAfterRenderAsync(Boolean firstRender)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)
DEBUG Received hub invocation: InvocationMessage { InvocationId: "", Target: "OnRenderCompleted", Arguments: [ 4,  ], StreamIds: [  ] }.
DEBUG Received hub invocation: InvocationMessage { InvocationId: "", Target: "EndInvokeJSFromDotNet", Arguments: [ 34, True, [34,true,null] ], StreamIds: [  ] }.

here is the code that has the treelist:


 <EditForm Model="@Disease" OnValidSubmit="@HandleValidSubmit" OnInvalidSubmit="@HandleInvalidSubmit">

        <DataAnnotationsValidator />
        <ValidationSummary />

        <div>
            <TelerikTextBox Title="Disease name" Label="Disease name" PlaceHolder="Enter disease name" @bind-Value="@Disease.name"></TelerikTextBox>
        </div>

        <div>
            <TelerikDropDownList Data="@Locale" TextField="Value" ValueField="Id" @bind-Value="selectedLocaleValue">
            </TelerikDropDownList>
        </div>


        <TelerikTreeList Data="@DataFields"
                         ItemsField="DirectReports"
                         HasChildrenField="HasReports"
                         Pageable="false"
                         Sortable="false"
                         FilterMode="@TreeListFilterMode.FilterMenu"
                         Width="850px" Height="800px"
                         Resizable="true" Reorderable="true"
                         OnUpdate="@UpdateItem"
                         OnDelete="@DeleteItem"
                         OnCreate="@CreateItem"
                         OnEdit="@OnEditHandler"
                         OnCancel="@OnCancelHandler"
                         EditMode="@TreeListEditMode.Inline">

            <TreeListColumns>

                <TreeListColumn Field="Value" Width="400px" Expandable="true" Title="Value"></TreeListColumn>
                <TreeListCommandColumn Width="200px" Context="diseasesParams">
                    @{
                        var item = diseasesParams as ListHierarchical;
                        if (item.HasChildren)
                        {
                            <TreeListCommandButton Command="Add" Icon="plus">Add Child</TreeListCommandButton>
                        }
                        if (item.IsEditable)
                        {
                            <TreeListCommandButton Command="Edit" Icon="edit">Edit</TreeListCommandButton>
                        }
                        if (item.IsRemovable)
                        {
                            <TreeListCommandButton Command="Delete" Icon="delete">Delete</TreeListCommandButton>
                        }
                    }

                    <TreeListCommandButton Command="Save" Icon="save" ShowInEdit="true">Update</TreeListCommandButton>
                    <TreeListCommandButton Command="Cancel" Icon="cancel" ShowInEdit="true">Cancel</TreeListCommandButton>
                </TreeListCommandColumn>
            </TreeListColumns>
        </TelerikTreeList>


        <div>
            @if (Disease.name != "")
            {
                <a class="btn btn-danger" @onclick="@DeleteDisease">
                    Delete
                </a>
            }
            <button type="submit" class="btn btn-primary edit-btn">Save disease</button>

            <a class="btn btn-outline-primary" @onclick="@NavigateToOverview">Back to overview</a>
        </div>


    </EditForm>

 

 

 

If I move the TreeList outside the EditForm everything works without a problem but I am reluctant to do so because it is a better code-structure to have all the components inside the EditForm.

 

Is there any way to avoid this exception?

 

with regards

Lucian

Lucian
Top achievements
Rank 1
Iron
 updated answer on 31 Aug 2021
1 answer
1.6K+ views

Hello,

I want to display a database table's content in a TelerikGrid object.

I am working with Linq and Entity Framework.

TelerikGrid's Data property is set with a Linq IQueryable object.

Why an IQueryable ? Because TelerikGrid manages paging, sorting and filtering. Working with an IQueryable object make possible the execution of a single SQL optimized query.

I have made a very basic loader (animation). I have a flag:

When this flag is set to true, the loader is displayed.

When the flag is set to false, the grid is displayed instead of the loader.

 

I don't know when set my flag to false. I am working with an IQueryable. So i don't know when the SQL query is finished. The execution of this SQL query is fired by the TelerikGrid. There are no events like "DataReady", or "DataLoadDone" in TelerikGrid. How can i do ?

Please note the embedded loader inside the TelerikGrid is not displayed for the first page. I can see it when i change TelerikGrid page.

Thanks

Marin Bratanov
Telerik team
 answered on 30 Aug 2021
1 answer
141 views
using jquery components we can fill the textbox with predefined text, can we have the same behaviour in blazor prompt?
Marin Bratanov
Telerik team
 answered on 29 Aug 2021
1 answer
1.0K+ views

I have a page with a Tab Strip on it.  One of the Tabs has a form on it. The user wants to be able to access a tab but then be able to go to the Tab with a form and fill in part of it, go to another tab and then back to the form and fill in some more of the form and then submit the form.  Are there any examples of being able to switch between tabs while persisting the data in the form until it is submitted?  

Each of the tabs consists of a separate component.

 

Marin Bratanov
Telerik team
 answered on 28 Aug 2021
2 answers
1.4K+ views

Hi when I select an item I get a change event as expected, but I also got one on lostfocus, when I tab away.

 


  <td class="pe-3"><TelerikComboBox
            Data="@ComboItems"
            TextField="Name"
             ValueField="Id"
             @bind-Value="SelectedValue"
             OnChange="ValueChangedHandler"/></td>

private void ValueChangedHandler(object value)
        {
            int id = (int) value;
            Console.WriteLine("" + id);
        }
ValueChangedHandler called twice


Marin Bratanov
Telerik team
 answered on 28 Aug 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?