Telerik Forums
UI for Blazor Forum
4 answers
371 views
I am using Telerik UI for Blazor. I am planning to reduce the size of JavaScript bundle used for Telerik UI blazor components. So how to create the custom bundle for particular components. so that I can reduce the page load time.
Can anyone help me on this!!
Aartheeswaran
Top achievements
Rank 1
 answered on 25 Nov 2020
12 answers
3.0K+ views

After release the fist load cause the error (same for each component on the page), reload the page helps to get rid of, Marin what information do you need to investigate?

Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: Could not find 'TelerikBlazor.initMenuItem' ('TelerikBlazor' was undefined).
      Error: Could not find 'TelerikBlazor.initMenuItem' ('TelerikBlazor' was undefined).
          at Array.forEach (<anonymous>)
          at e.findFunction (https://.../crm-b/_framework/blazor.webassembly.js:1:1247)
          at b (https://.../crm-b/_framework/blazor.webassembly.js:1:2989)
          at new Promise (<anonymous>)
          at Object.beginInvokeJSFromDotNet (https://.../crm-b/_framework/blazor.webassembly.js:1:3908)
          at Object.w [as invokeJSFromDotNet] (https://.../crm-b/_framework/blazor.webassembly.js:1:64006)
          at _mono_wasm_invoke_js_blazor (https://.../crm-b/_framework/dotnet.5.0.0.js:1:190800)
          at do_icall (<anonymous>:wasm-function[10595]:0x194e46)
Microsoft.JSInterop.JSException: Could not find 'TelerikBlazor.initMenuItem' ('TelerikBlazor' was undefined).
Error: Could not find 'TelerikBlazor.initMenuItem' ('TelerikBlazor' was undefined).
    at Array.forEach (<anonymous>)
    at e.findFunction (https://.../crm-b/_framework/blazor.webassembly.js:1:1247)
    at new Promise (<anonymous>)
    at Object.beginInvokeJSFromDotNet (https://.../crm-b/_framework/blazor.webassembly.js:1:3908)
    at Object.w [as invokeJSFromDotNet] (https://.../crm-b/_framework/blazor.webassembly.js:1:64006)
    at _mono_wasm_invoke_js_blazor (https://.../crm-b/_framework/dotnet.5.0.0.js:1:190800)
    at do_icall (<anonymous>:wasm-function[10595]:0x194e46)
   at Microsoft.JSInterop.JSRuntime.<InvokeAsync>d__15`1[[System.Object, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at Telerik.Blazor.Components.Menu.MenuItem`1.<OnAfterRenderAsync>d__80[[CRM.Client.Model.MenuItem, CRM.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)

 

 

Aleksandr
Top achievements
Rank 1
Bronze
Bronze
Veteran
 answered on 25 Nov 2020
4 answers
238 views

Hi

I have defined an OnUpload handler like this on the TelerikUpload:

<TelerikUpload AutoUpload="false" ...  OnUpload="@OnUploadHandler" ></TelerikUpload>

 

It turns out that the handler is only called when I click on the 'Upload' button. If the upload fails, the retry icon is shown. However when clicking on the Retry icon, the OnUpload handler is not called.

In my case that is a problem, because I add headers and request in this event:

async Task OnUploadHandler(UploadEventArgs e)
{
    e.RequestData.Add("SomeFormField", "Hello world!"); // for example, user name
    e.RequestHeaders.Add("Authorization", "Bearer " + Token); // for example, authentication token
}

 

It does not matter if the request is to same host or cross-domain.

Best regards


 

 

 

Marin Bratanov
Telerik team
 answered on 25 Nov 2020
1 answer
957 views

just a basic list as a data source:

public List<Feature> Features { get; set; } = new List<Feature>();

as simple as I can make the Grid:

<TelerikGrid Data="@Features" Sortable="true">
    <GridColumns>
        <GridColumn Field="Qty" />
    </GridColumns>
</TelerikGrid>

And an event to add features:

void AddFeature()
{
    Features.Add(new Feature() { Qty = 1 });
}

 

I can add the features just fine, but nothing shows in the grid until I sort, then it is all there - what am I missing?

8.5.2
Nadezhda Tacheva
Telerik team
 answered on 24 Nov 2020
1 answer
783 views

Hello,

Sorry if this has already been asked, but I couldnt find a topic on that subject.

I would like to know if it's possible to validate for a duplicate value for a field when submitting an add/edit of a record in a grid (popup edit) and return an error in the form to inform the user that the value is already used.

I am able to do it in the appropriate handle after the submit but i can't seem to prevent the form to close and to display an error message to the user.

Thanks!

Nadezhda Tacheva
Telerik team
 answered on 24 Nov 2020
1 answer
592 views
Can you apply an OR condition on 2 column filters, or programmatically set the filter value for the GridSearchBox ?
Nadezhda Tacheva
Telerik team
 answered on 24 Nov 2020
7 answers
258 views
I am using a Combobox (probably the same for all editors) and it is auto assigned the k-state-valid class upon creation. I would like to have this class only be assigned once the Forms Validate method is called. Is there a way to do this?
Marin Bratanov
Telerik team
 answered on 24 Nov 2020
1 answer
142 views

Hi guys,

Is there a possibility in incell edit mode, on edit, when a text/numeric input shows up, from the EditTemplate, it's text to be selected by default?

What I want to achieve is the following: in a numeric input we have the default value of zero. I want that value to be selected as when the user does a copy+paste in the input that value will be overwritten. If it's not selected the cursor appears after that value so when the user does a copy+paste then the new value will be concatenated with the value that was present in the input before the copy+paste, which is an issue that I don't want to achieve.

 

I hope you understood what I want to achieve.

Best regards,

Cipri

Marin Bratanov
Telerik team
 answered on 24 Nov 2020
1 answer
246 views

Is is possible to add a trend line / linear regression to the Blazor charts like Excel?

See it is available in the kendo charts (https://docs.telerik.com/kendo-ui/knowledge-base/chart-add-trend-line).

Also found the old 2015 knowledge base article (https://www.telerik.com/blogs/how-to-plot-a-simple-linear-regression-in-telerik-asp.net-web-form-chart)

Marin Bratanov
Telerik team
 answered on 24 Nov 2020
1 answer
722 views

To give some background, I'm looking at this from the perspective of using the grid in a similar fashion as Excel.

My users will click on a cell in the row and then from there navigate via the keyboard or mouse.

If you go to the Grid - Incell Editing demo page and click into the first editable column (Weight) and then hit tab, the focus leaves the grid entirely (not desireable).  Also, if you are in the Weight field and mouse click into the field immediately to the right (Color) the current active cell flashes but then stays in focus.  It's a bit of a mess.  My intent is to have a grid that expert users can navigate quickly using the keyboard with little mouse input.  

Is Inline editing a better option?  Can I leverage a row-click event to bring the row in edit mode?  Can navigating away from the row trigger an automatic update? Or what about hitting tab in the last editable cell?  Can we have it automatically add a new row and enter edit mode on the new row?

The users would revolt against having to click and Edit button and a Save button on each row.

 

Marin Bratanov
Telerik team
 answered on 24 Nov 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?