Telerik Forums
UI for Blazor Forum
2 answers
427 views

I use a MVVM approach to populate the Grid. The rows are actually viewmodels keeping state. They have no parameterless constructor, they are created by factory methos using injected services. The Grid creates the item before assigning it to the event args passed to the handler method. 

In my case "No parameterless constructor defined for type '...' is thrown. How can I have control on the creation of my row models?

Marin Bratanov
Telerik team
 answered on 23 Apr 2020
5 answers
411 views

After upgrade to 2.10.0, the ComboBox control with OnRead event, I get the error:

Uncaught (in promise) Error: System.ArgumentException: There is no event handler associated with this event. EventId: '38'. (the number differs between errors)
The page "blinks" and the control fills with an empty Guid (SelectedPersonId type)
The post to the server is performed correctly
This worked with 2.9.0

js:
<script src="https://kendo.cdn.telerik.com/blazor/2.10.0/telerik-blazor.min.js" defer></script>

razor:
<TelerikComboBox Data="PersonSearchResult"
OnRead="@SearchPersons"
Filterable="true"
TextField="FullName"
ValueField="Id"
@bind-Value="SelectedPersonId"
Width="400px">
</TelerikComboBox>

and cs:

private async Task SearchPersons(ComboBoxReadEventArgs args)
{
if (args.Request.Filters.Count > 0)
{
var filter = args.Request.Filters[0] as FilterDescriptor;
var search = filter.Value.ToString();
if (search.Length >= 2)
{
PersonSearchResult = await Post<List<PersonModel>>("api/person/person-search", search, true);
}
}
}

Svetoslav Dimitrov
Telerik team
 answered on 22 Apr 2020
1 answer
982 views

Hi

Any ideas how I can create a Modal Login Window on startup?

and validate a user / pass? I have done this before using the Telerik ASP.Net - RadWindow.

thx in advance

Marin Bratanov
Telerik team
 answered on 21 Apr 2020
4 answers
1.7K+ views

Any plans to add a Kanban board component similar to this?

https://www.syncfusion.com/blazor-components/blazor-kanban-board

 

Marin Bratanov
Telerik team
 answered on 20 Apr 2020
2 answers
362 views

Hello,

is it possible to pre-select the very first row in Grid in SelectionMode="GridSelectionMode.Single"? I need to do that by default when the Grid displays the very first time. I have second grid that based on this selection. I have already implemented the proper way of populating the second Grid and now just need to display display the first row selected.

Thanks.

Andrey
Top achievements
Rank 1
Veteran
 answered on 18 Apr 2020
4 answers
1.8K+ views

The ComboBox control does not appear to be refreshing/updating when the underlying list that it is bound to is updated. Some sample code to replicate this is:

 

@page "/"
@using Telerik.Blazor;

<TelerikComboBox Data="@ComboValues" Value="@SelectedValue"  ValueChanged="@((string v) => ComboBoxSelectionChanged(v))" >
</TelerikComboBox>

@code {
    List<string> ComboValues = new List<string> { "One", "Two", "Three", "Four", "Five" };

    string SelectedValue = null;

    void ComboBoxSelectionChanged(string v)
    {
        ComboValues.Remove(v);
        ComboValues.Add("New " + v);

       SelectedValue = null;
    }
}

Keep in mind this is overly simplistic but does demonstrate what isn't working as expected.

I would expect in this case for the selected entry to be removed from the ComboBox and replaced with "New {Selected Entry}";

I had this working fine relatively recently but started updating my code after upgrading to version 2.10.  Now i can't tell for sure if this is a bug introduced in version 2.10 or if i just made a change that broke things.

Any feedback would be greatly appreciated.

Thank You

Josh 

Joshua
Top achievements
Rank 1
 answered on 16 Apr 2020
3 answers
343 views

The html in bold is generated by the Menu control for a menu item, the non-bold code is from my menu item template.

The k-link / k-menu-link styles provides the mouse over and cursor effect.


<li class="k-item k-menu-item telerik-blazor"
data-id="e5bda03c-693b-4a70-9310-75977f58d39a" role="menuitem"
aria-live="polite" tabindex="0" aria-label="Paste">
    <span class="k-in k-link  k-menu-link   ">
        <span class="lt-menu-item lt-disabled">
            <img src="EditPaste.svg"><span>Paste</span>
        </span>
    </span>
</li>

I'm trying to create a disabled menu item, but I realy need to style the k-menu-link span otherwise the effect is not on the full menu item (see image).

Any thoughts on how to do this, or would it be possible to provide a property that allows a style to be injected into the  <span class="k-in k-link  k-menu-link   ">

Marin Bratanov
Telerik team
 answered on 16 Apr 2020
2 answers
147 views

When a menu is shown I need to be able to enable disable the sub menu items, so I need to hook an expanding event before the sub menu is rendered.

Is there any plan to add an OnExpanding event that is raised before the sub item is expanded?

Marin Bratanov
Telerik team
 answered on 16 Apr 2020
1 answer
205 views
in version 2.10, while not in 2.9 if you refresh F5 a page with a datagrid you get an error: 


System.InvalidOperationException: The current thread is not associated with the Dispatcher. Use InvokeAsync() to switch execution to the Dispatcher when triggering rendering or component state. at Microsoft.AspNetCore.Components.Dispatcher.AssertAccess() at Microsoft.AspNetCore.Components.RenderTree.Renderer.AddToRenderQueue(Int32 componentId, RenderFragment renderFragment) at Microsoft.AspNetCore.Components.ComponentBase.StateHasChanged() at Telerik.Blazor.Components.Common.BaseComponent.StateHasChanged() at Telerik.Blazor.Components.TelerikGridBase`1.RemoveColumn(IGridColumn column) at Telerik.Blazor.Components.TelerikGridBase`1.Telerik.Blazor.Components.Grid.IGridContainer.RemoveColumn(IGridColumn column) at Telerik.Blazor.Components.Grid.GridColumnBase.Dispose() at Microsoft.AspNetCore.Components.Rendering.ComponentState.Dispose() at Microsoft.AspNetCore.Components.RenderTree.Renderer.Dispose(Boolean disposing) --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Components.Rendering.HtmlRenderer.HandleException(Exception exception) at Microsoft.AspNetCore.Components.RenderTree.Renderer.Dispose(Boolean disposing) at Microsoft.AspNetCore.Components.RenderTree.Renderer.Dispose() at Microsoft.AspNetCore.Mvc.ViewFeatures.StaticComponentRenderer.PrerenderComponentAsync(ParameterView parameters, HttpContext httpContext, Type componentType) at Microsoft.AspNetCore.Mvc.ViewFeatures.ComponentRenderer.PrerenderedServerComponentAsync(HttpContext context, ServerComponentInvocationSequence invocationId, Type type, ParameterView parametersCollection) at Microsoft.AspNetCore.Mvc.ViewFeatures.ComponentRenderer.RenderComponentAsync(ViewContext viewContext, Type componentType, RenderMode renderMode, Object parameters) at Microsoft.AspNetCore.Mvc.TagHelpers.ComponentTagHelper.ProcessAsync(TagHelperContext context, TagHelperOutput output) at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.<RunAsync>g__Awaited|0_0(Task task, TagHelperExecutionContext executionContext, Int32 i, Int32 count) at JarodProject.Pages.Pages__Host.<ExecuteAsync>b__14_1() in C:\Users\kodie\source\repos\JarodSource\JarodProject\Pages\_Host.cshtml:line 30 at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.SetOutputContentAsync() at JarodProject.Pages.Pages__Host.ExecuteAsync() in C:\Users\kodie\source\repos\JarodSource\JarodProject\Pages\_Host.cshtml:line 5 at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context) at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts) at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context) at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode) at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|29_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeResultFilters>g__Awaited|27_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.MigrationsEndPointMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
Marin Bratanov
Telerik team
 answered on 16 Apr 2020
3 answers
933 views

Hello,

I have two grids on one page. The first one has SelectionMode="GridSelectionMode.Single" and the second one is re-reading the data (SQL) based on this selection. I am using Single Selection and handling the SelectedItemsChanged event. This works fine except the first grid is not unselecting the previously selected row so now it displays all previously selected rows.

Click on first grid first row. First grid first row selected. Grid2 content refreshed. That's fine.

Click on first grid second row. First grid second row selected. Grid2 content refreshed. But the grid1 first row is still selected.

I am using UI Kendo 2.1.

Thanks.

Andrey
Top achievements
Rank 1
Veteran
 answered on 15 Apr 2020
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?