Telerik Forums
UI for Blazor Forum
6 answers
636 views

Hi,

 

I am getting the following exception from the grid and cannot understand why. The collection supplied to the function is definitely not empty and my function exits without a throw. Is there a way to understand why the code inside the grid is throwing an error? Then the circuit crashes and the blazor application is now dead.

If I use a GridCommandColumn no errors are raised.

 Unhandled exception rendering component: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')<br>System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')<br>   at System.Collections.Generic.List`1.get_Item(Int32 index)<br>   at Telerik.Blazor.Components.Grid.GridDataCellBase`1.get_Column()<br>   at Telerik.Blazor.Components.Grid.GridContentCell`1.get_BoundColumn()<br>   at Telerik.Blazor.Components.Grid.GridContentCell`1.OnClick()<br>   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)<br>   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)<br>fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]<br>      Unhandled exception in circuit '-1BdfTDXKpRyAHNMXnaoanw8GipVDkrJ6NXuvg48GmA'.<br>System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')<br>   at System.Collections.Generic.List`1.get_Item(Int32 index)<br>   at Telerik.Blazor.Components.Grid.GridDataCellBase`1.get_Column()<br>   at Telerik.Blazor.Components.Grid.GridContentCell`1.get_BoundColumn()<br>   at Telerik.Blazor.Components.Grid.GridContentCell`1.OnClick()<br>   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)<br>   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)


 

Marin Bratanov
Telerik team
 answered on 06 Mar 2020
1 answer
277 views

According to this Link, CRUD functionality for the TreeView control is available starting with version 2.7.0.  Do you have a working example you could share?

 

Link

 

Svetoslav Dimitrov
Telerik team
 answered on 05 Mar 2020
6 answers
176 views

The Blarzo UI Is getting better.
I just put forward something missing:
1>The Chart UI need:

      tooltip/datapoint label/Crosshair,Maybe I didn't see an example( except the Pie Chart)
2>The DatePicker/DateTimePicker/NumericTextbox need:

      Modify data with mouse wheel
3>The DatePicker/DateTimePicker's droplist need:

      MouseOver effect.

4>In the future,Step by step realized  these function Similar to the Aspnet core UI.

Marin Bratanov
Telerik team
 answered on 05 Mar 2020
1 answer
666 views

Is it possible to paste multiple rows into the grid, whether it's from excel or notepad, I don't care, I'd just like to have the capability.

Thanks .... Ed

 

Marin Bratanov
Telerik team
 answered on 04 Mar 2020
1 answer
248 views
Is there a way to remove the indicator when no children are returned for a row?
Marin Bratanov
Telerik team
 answered on 04 Mar 2020
1 answer
697 views
Does blazor Grid support custom Aggregate functions on grouping with alignment?
Marin Bratanov
Telerik team
 answered on 04 Mar 2020
2 answers
618 views

Hello,

Is it possible to use the UI for Blazor within a Razor class library?

We have a project where we need to have multiple reusable component libraries that will ideally be based on UI for Blazor, in our current tests we add the nuget package to the Razor class library and it fails to be recognised when trying to consume the namespaces. Also we need to share the App between Server and Client Blazor, once again requiring the UI for Blazor to be with a shared razor library.

Thanks,

Andy.

Andy
Top achievements
Rank 1
 answered on 03 Mar 2020
2 answers
219 views

Hi,

 

I am trying to run a blazor server side component inside a razor view page.

 

So the razor view is this:

 

<div class="wrapper">
 
    @await Html.PartialAsync("_farmMenu", new PfmsWeb.Areas.Shared.ActiveMenu("PickupSequence"))
 
    <div id="main" class="sidebar-page main">
        <component type="@typeof(PfmsWeb.Components.Harvest.PickupSequence.PickupSequenceShell)" render-mode="ServerPrerendered"/>
    </div>
</div>

 

And the PickupSequenceShell.razor file looks like this:

 

<TelerikRootComponent>
Shell Started
<br/>
<Counter/>
</TelerikRootComponent>

 

However, when running the application the counter is not rendered at all. If I reference the counter directly from the razor view it does work. There must something in my understanding that is stopping this from working properly. It cannot be the blazor js as like I said I can run the counter directly from the razor view.

This is a very large application so I cannot easily just bring the entire thing into blazor server side, I have to host little blazor server side apps inside the razor views refactoring parts of the application as I go.

Has anyone managed to get a hybrid app working on dotnet core with controllers and views?

 

Marin Bratanov
Telerik team
 answered on 03 Mar 2020
1 answer
687 views

Hi there,

I need the same fuctionality of the "Add" command of the grid's toolbar but using a button located anywhere in the page. Is this possible?

 

<GridToolBar>
   <GridCommandButton Command="Add" Icon="add">Add Item</GridCommandButton>
</GridToolBar>

Thank you.

Svetoslav Dimitrov
Telerik team
 answered on 02 Mar 2020
1 answer
621 views

We are evaluation the blazor controls from telerik and would like to know few things.

1. Is it possible to implement fluent validation as part of the object validation as done here? https://blog.stevensanderson.com/2019/09/04/blazor-fluentvalidation/

I tried doing this but it would not catch the validation

 

  <EditForm Model="@selectedBuildingModel" OnValidSubmit="@Save">
            <FluentValidator TValidator="BuildingModelValidator" />
            <div class="form-row">
                <div class="col">
                    <TelerikTextBox @bind-Value="@selectedBuildingModel.Name" Label="First Name"></TelerikTextBox>
                    <ValidationMessage For="@(() => selectedBuildingModel.Name)" />
                </div>

            </div>

            <div class="form-row">
                <ValidationSummary />
                <TelerikButton Icon="save" Primary="true" ButtonType="@ButtonType.Submit">Save</TelerikButton>
                <TelerikButton Icon="cancel" OnClick="@ClearSelection" ButtonType="@ButtonType.Button">Cancel</TelerikButton>
            </div>
        </EditForm>

  public class BuildingModelValidator : AbstractValidator<BuildingModel>
    {
        public BuildingModelValidator()
        {
            RuleFor(x => x.Name).NotEmpty().MaximumLength(5);
        }
    }

2. When will the upload control be available (even if its insiders, we just wanna see how it works)?

 

Thank you

Marin Bratanov
Telerik team
 answered on 02 Mar 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?