Telerik Forums
UI for Blazor Forum
1 answer
165 views

Hi,

I have a column and collection with different values and if I add the new value or remove the value, the filter is not refreshing.

How can I have the refresh?

Could you please guide on this.

Thanks,

Vishnu Vardhanan

Matthias
Top achievements
Rank 5
Bronze
Bronze
Iron
 answered on 06 Sep 2021
1 answer
139 views

Hi,

I have a column and collection with different values and if I add the new value or remove the value, the filter is not refreshing.

How can I have the refresh?

Could you please guide on this

Thanks,

Vishnu Vardhanan

Matthias
Top achievements
Rank 5
Bronze
Bronze
Iron
 answered on 06 Sep 2021
1 answer
415 views

I am a little confused about where kendo css stops and where bootstrap starts.

I can see that all Blazor Controls are created using kendo css classes.

Are there utilities for margin, padding and grid layout in the kendo library, can I skip bootstrap?

Dimo
Telerik team
 answered on 03 Sep 2021
1 answer
172 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
452 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
971 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
355 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
85 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
Narrow your results
Selected tags
Tags
+105 more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?