Telerik Forums
UI for Blazor Forum
3 answers
1.5K+ views

We wanted to see if the Telerik controls like the Masked Input performed any faster when running in release mode as opposed to debug mode of Visual Studio 2019.

 

But when I switch to release mode and tried to build the app I got the following three errors which do not occur in debug mode. Can you help me?

 

Severity Code Description Project File Line Suppression State
Error CS0006 Metadata file 'C:\Projects\VSWorkspace\BlazerDemo\Client\bin\Release\netstandard2.1\BlazorDemo.Client.dll' could not be found BlazorDemo.Server C:\Projects\VSWorkspace\BlazerDemo\Server\CSC 1 Active

Severity Code Description Project File Line Suppression State
Error Unhandled exception. Mono.Linker.LoadException: Error while processing references of 'Telerik.Blazor, Version=2.24.0.0, Culture=neutral, PublicKeyToken=20b4b0547069c4f8' BlazorDemo.Client C:\Users\david\.nuget\packages\microsoft.aspnetcore.components.webassembly.build\3.2.1\targets\Blazor.MonoRuntime.targets 326

 

Severity Code Description Project File Line Suppression State
Error ILLink failed with exit code -532462766. BlazorDemo.Client C:\Users\david\.nuget\packages\microsoft.aspnetcore.components.webassembly.build\3.2.1\targets\Blazor.MonoRuntime.targets 326
David
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 26 May 2021
1 answer
322 views

Hi

The documentation reads:

  • Fields - a list of string that denotes the fields names that the grid should search in. By default, the grid looks in all string fields in its currently visible columns, and you can define a subset of that.

Question 1:

Why only string fields? In the Netherlands we have a numeric field which is unique for all persons living in the netherlands, many customers search for people using this number, So now i have to make this fields a string to let the user search on it?

 

Question 2:

Lets say i have 2000 records, only 140 records are fetched so far, how is the search working, only on these 140 records?

I can imagine that my rest server is called to let me make a query with a where clause based on the entered search value.

 

Eric

 

 

 

 

 

Marin Bratanov
Telerik team
 answered on 24 May 2021
1 answer
1.3K+ views

I have a grid bound to a List<> of data.

I have a button in the row to remove the row.

I am not using "OnRead".

If I would like to delete the row (and send the change to the backend), how do I remove the row from the grid without having to refresh all the data?

 

I have tried removing it from the List<> and then calling StateHasChanged, but it has no effect on the grid.  The record is removed in the backend.

 

Please advise.

Marin Bratanov
Telerik team
 answered on 24 May 2021
2 answers
302 views

Just that.
Is there an "out of the box" grouping functionality in TreeList component?? 

If it is not possible, do you have any suggestions on how I can accomplish this?

Regards,

 
Blazorist
Top achievements
Rank 2
Bronze
Iron
Iron
 answered on 21 May 2021
1 answer
2.2K+ views

Hello, a REALLY basic question here, as I don't work on the UI tier very often.  I am looking for a little help getting started with Less-Based themes.  I'm reading https://docs.telerik.com/kendo-ui/styles-and-layout/appearance-styling.

How do I add the CSS files (kendo.common.css  and kendo.[theme].css) to my Visual Studio 2019 project?  I.e., where are they installed on my Windows 10 machine so I can reference them?  Or, is there a URL to Telerik that I have to configure somewhere in my project?

I am also going to throw out this anticipatory question - Do you think I will be able to do things like make Blazor Grid rows shorter in height via using Less-Based (or any)Themes...or do I need to make my own CSS classes to accomplish this? 

Thanks a lot!

Marin Bratanov
Telerik team
 answered on 21 May 2021
1 answer
869 views
With my original queston, I got to know about FileSelect here. I'm now able to send files to my internal unexposed Api. How do I download these files? I want to have an Api that sends file back to Blazor Portal. My files are saved as byte[] in a SQL table. I'm also triyng to figure out a way to show preview of common files on the portal as well. Any helpers?
Marin Bratanov
Telerik team
 answered on 21 May 2021
3 answers
1.7K+ views

Hi,

 

I have created a grid where I have some fixed columns at the being, then I have a list interaction to create some columns, and then I have more two columns which I would like to keep at the end of the grid. But, it is rendering all columns insert in the "foreach" loop in the end.

 

Here is my grid:

<TelerikGrid Data=@TenantBillingList
                         Sortable="true"
                         Groupable="true"
                         FilterMode="@GridFilterMode.FilterMenu"
                         Pageable="true" PageSize="50"
                         ShowColumnMenu="true">
                <GridColumns>
                    <GridColumn Field="@nameof(TenantBillingDto.TenantName)" FieldType="@(typeof(string))" Title="@L["TenantBilling.TenantName"]">
                        <Template>
                            <b>@((context as ExpandoObject).GetOrDefault(nameof(TenantBillingDto.TenantName)))</b>
                        </Template>
                    </GridColumn>
                    <GridColumn Field="@nameof(TenantBillingDto.EditionName)" FieldType="@(typeof(string))" Title="@L["TenantBilling.EditionName"]" />
                    <GridColumn Field="@nameof(TenantBillingDto.CountryCode)" FieldType="@(typeof(string))" Title="@L["TenantBilling.CountryCode"]" />
                    <GridColumn Field="@nameof(TenantBillingDto.Currency)" FieldType="@(typeof(string))" Title="@L["TenantBilling.Currency"]" />
                    <GridColumn Field="@nameof(TenantBillingDto.EditionCost)" FieldType="@(typeof(double))" Title="@L["TenantBilling.EditionCost"]">
                        <Template>
                            @(((context as ExpandoObject).GetOrDefault(nameof(TenantBillingDto.EditionCost)) as int?).GetValueOrDefault().ToString("N2"))
                        </Template>
                    </GridColumn>

                    @foreach (var consumable in ConsumableList)
                    {
                        <GridColumn Field="@(nameof(TenantBillingConsumablesDetailsDto.ConsumableQty) + "_" + consumable.Name)" FieldType="@(typeof(int))" Title="@(consumable.Name + " #")" />
                        <GridColumn Field="@(nameof(TenantBillingConsumablesDetailsDto.ConsumableCost) + "_" + consumable.Name)" FieldType="@(typeof(double))" Title="@(consumable.Name + " $")">
                            <Template>
                                @(((context as ExpandoObject).GetOrDefault(nameof(TenantBillingConsumablesDetailsDto.ConsumableCost) + "_" + consumable.Name) as double?).GetValueOrDefault().ToString("N2"))
                            </Template>
                        </GridColumn>
                    }

                    <GridColumn Field="@nameof(TenantBillingDto.ConsumableTotalCost)" FieldType="@(typeof(double))" Title="@L["TenantBilling.ConsumableTotalCost"]">
                        <Template>
                            @(((context as ExpandoObject).GetOrDefault(nameof(TenantBillingDto.BillTotalCost)) as double?).GetValueOrDefault().ToString("N2"))
                        </Template>
                    </GridColumn>

                    <GridColumn Field="@nameof(TenantBillingDto.BillTotalCost)" FieldType="@(typeof(double))" Title="@L["TenantBilling.BillTotalCost"]">
                        <Template>
                            <b>@(((context as ExpandoObject).GetOrDefault(nameof(TenantBillingDto.BillTotalCost)) as double?).GetValueOrDefault().ToString("N2"))</b>
                        </Template>
                    </GridColumn>
                </GridColumns>
            </TelerikGrid>

 

Here is the grid result. As you can see, the columns "Total Consumables" and "Total $" should be at the end, and not before my dynamic columns.

Hristian Stefanov
Telerik team
 answered on 21 May 2021
1 answer
1.0K+ views

Hi,

How can set the height of a Form and How can set font size of text in form items?

Svetoslav Dimitrov
Telerik team
 answered on 21 May 2021
1 answer
1.4K+ views

I have a Blazor page which has a Telerik TabStrip component with 2 tabs.

The first tab which is the default tab has a Telerik Grid on it.  This grid uses custom paging, filtering and sorting and as such uses the OnRead method to load data from a database using the GridSourceRequest.

As soon as the Blazor page is navigated to the grid fires the OnRead event using the default grid state and gets the first page of data and populates the grid for the user.

Any user interaction with the grid like sorting or filtering etc fires the OnRead event which in turns queries the database and updates the grid with new data.

So far so good, everything working as expected.

If I click the second tab on the TabStrip to perform some other function and then return back to the grid by clicking the first tab.  What I am expecting to see is the Grid with all its data and state as it was before I clicked on the second tab.

In reality what I get is the OnRead event fires and populates the grid with data from the database which matches the default grid state as if it was the first time that the grid had loaded.

After looking on these forums I realise that this is expected behaviour using the TapStrip component as this is the Blazor way of rendering which means that anything not visible on screen gets removed from the RenderTree and no state is retained.

I up-voted a feature request for the TapStrip component to be enchanced to allow state between tab changes to get persisted or just hidden using CSS. 

But in the meantime I'm looking to implement a solution that will persist the grid state when clicking on tab 2 and then setting the grid state back using the persisted state when clicking back on tab 1.

So far I have managed to persist the grid state but am having trouble setting the grid state.back. 

I have tried calling SetState() on the active tab change event when the new selected tab is tab 1.

This sort of works but what happens is that the grid loads and immediately calls OnRead and populates the grid once with the wrong data and state by calling the database; then the grid flashes and updates with the correct data and state from the SetState() call with data that was persisted in memory.

I have tried updating the OnRead method to only call the database when the persisted state object in memory is null.  I am then trying to set the grid set in the OnInitState event using the persisted state. 

I'm not sure at what point I want reset the persisted state object to null as that means the OnRead method will start calling the database again (which I want it to do eventually) but it seems that when setting the state the OnRead event handler is called multiple times and therefore I don't want the object to be null until the state has been fully set.

Any ideas on how to achieve this please?

 

 

Marin Bratanov
Telerik team
 answered on 21 May 2021
1 answer
338 views

Maybe I'm missing something but I'm not seeing an EditMode = @GridEditMode.None or maybe an Editable = False option. 

How can I quickly set my data grid into a readonly mode?

I realize I can add the "disabled" attribute to the containing <div> element but that disables scrolling and paging through the data.

Marin Bratanov
Telerik team
 answered on 20 May 2021
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?