Telerik Forums
UI for Blazor Forum
1 answer
296 views

Scenario:

I have a window that I am using to edit values, has textboxes, the dropdown, and other controls.

Window is opened, textbox loads with the bound value, lets say value = 100.

Change the textbox to say maybe 101.

Select a new dropdown option.

After the dropdown selection is chosen and it's new value binds, it resets the other controls to the original value, so the 101 is back to 100.

Marin Bratanov
Telerik team
 answered on 24 Jun 2019
1 answer
292 views
how to set Grid Multiple Column Header?
Marin Bratanov
Telerik team
 answered on 24 Jun 2019
4 answers
148 views

 

I am getting the following exception when I load a page with the DateInput widget on it:

Microsoft.AspNetCore.Components.Server.ComponentHub: Warning: Unhandled Server-Side exception

Microsoft.JSInterop.JSException: this.element.addEventListener is not a function
TypeError: this.element.addEventListener is not a function
    at t.value (https://kendo.cdn.telerik.com/blazor/1.0.0/telerik-blazor.min.js:1:3367)
    at new t (https://kendo.cdn.telerik.com/blazor/1.0.0/telerik-blazor.min.js:1:2735)
    at initialize (https://kendo.cdn.telerik.com/blazor/1.0.0/telerik-blazor.min.js:1:2169)
    at https://localhost:44329/_framework/blazor.server.js:8:21434
    at new Promise (<anonymous>)
    at e.beginInvokeJSFromDotNet (https://localhost:44329/_framework/blazor.server.js:8:21403)
    at https://localhost:44329/_framework/blazor.server.js:1:16653
    at Array.forEach (<anonymous>)
    at e.invokeClientMethod (https://localhost:44329/_framework/blazor.server.js:1:16624)
    at e.processIncomingData (https://localhost:44329/_framework/blazor.server.js:1:14624)
   at Telerik.Blazor.Components.DateInput.TelerikDateInputBase`1.OnAfterRender()
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_0(Object state)
   at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteSynchronously(TaskCompletionSource`1 completion, SendOrPostCallback d, Object state)
   at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.<>c.<.cctor>b__23_0(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteBackground(WorkItem item)

 

 

Here is a simple example page taken and simplified from the demo source code that reproduces the problem:

@page "/Tests"

@using Telerik.Blazor.Components.DateInput

    <strong> Hire Date</strong>
    <TelerikDateInput @bind-Value="HireDate" Format="MMMM/dd/yyyy"></TelerikDateInput>

@code  {
    DateTime HireDate = new DateTime(2018, 5, 6);
}

I tried it with an ampersand in front of HireDate as it was in the demo code sample like so and got the same results:
      <TelerikDateInput @bind-Value="@HireDate" Format="MMMM/dd/yyyy"></TelerikDateInput>

 

Thanks,

Kenny

Marin Bratanov
Telerik team
 answered on 24 Jun 2019
5 answers
574 views

The date picker works fine on my machine debugging in VS but moving it out to a server I get an error.

It fails when I click a date.

From fiddler:

DELETE http://app2/purchaserequests/_blazor?id=FHxqj9eUdV72Ogv7Nz_OEg HTTP/1.1
Origin: http://app2
Referer: http://app2/purchaserequests
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/18.17763
Cache-Control: max-age=0
Accept: */*
Accept-Language: en-US,en;q=0.5
Content-Type: text/plain;charset=UTF-8
X-Requested-With: XMLHttpRequest
Accept-Encoding: gzip, deflate
Content-Length: 0
Host: app2
Connection: Keep-Alive
Pragma: no-cache
Authorization: Negotiate YIIGqwYGKwYBBQUCoIIGnzCCBpugMDAuBgkqhkiC9xIBAgIGCSqGSIb3EgECAgYKKwYBBAGCNwICHgYKKwYBBAGCNwICCqKCBmUEggZhYIIGXQYJKoZIhvcSAQICAQBuggZMMIIGSKADAgEFoQMCAQ6iBwMFACAAAACjggSaYYIEljCCBJKgAwIBBaEQGw5OUkdTWVNURU1TLklOQ6IXMBWgAwIBAqEOMAwbBEhUVFAbBGFwcDKjggReMIIEWqADAgESoQMCATKiggRMBIIESDaAgCIPU5pwlAqbtuKJi6cKIYQi6RENH0nqdRQKfHkqZt

**************************************************************************************************************************************************************************************

The response:

HTTP/1.1 404 Not Found
Transfer-Encoding: chunked
Content-Type: text/plain
Server: Microsoft-IIS/8.5
Persistent-Auth: true
X-Powered-By: ASP.NET
WWW-Authenticate: Negotiate oYG2MIGzoAMKAQChCwYJKoZIgvcSAQICooGeBIGbYIGYBgkqhkiG9xIBAgICAG+BiDCBhaADAgEFoQMCAQ+ieTB3oAMCARKicARuwTmW8q4q9F/fdoaK2/PDruGCkdkI7pOEjkefMGWNE36IZgNAIO+ECmKhZPsMUdi4SedW9NPcpRcyWbO/IKn52HOhDPYUkcCGmxVbMPW006UvpzDPa2/HKJJxO7JDuw0+b8Yi6bIibjNVbxvL/AM=
Date: Tue, 18 Jun 2019 01:19:11 GMT
1a
No Connection with that ID
0

Marin Bratanov
Telerik team
 answered on 20 Jun 2019
3 answers
381 views

I have been playing around with the pie chart example within the documentation. I have my chart within a card view and I noticed there is a position property on both the Title and Legend of the chart but not for the Chart or SeriesItems. 

I was wondering if it is possible to set the position of the chart within the HTML or if this is something that is going to be added later?

 

Thanks,

Cameron

Marin Bratanov
Telerik team
 answered on 14 Jun 2019
3 answers
662 views

I made a ticket on this but thought I would post here as well.

It appears there is an issue with the latest Telerik Blazor version when it comes to adding new grid items.

I can't get it to work in my project and can't get it to work in your demo either.

https://demos.telerik.com/blazor-ui/grid/editing-inline 

Click add new employee.

Fill the info boxes.

View the added row. The Name field is empty.

I stepped through the code in my project and the parameter from the field is always null.

Marin Bratanov
Telerik team
 answered on 14 Jun 2019
2 answers
88 views
I don't see the new release 1.1.1 in the telerik nuget feed, do I need to do something special?
Kenny
Top achievements
Rank 2
 answered on 07 Jun 2019
3 answers
3.0K+ views

     Hi all, 

New to Blazor and Web development in General, but using Blazor as a way to bridge the gap between my c# knowledge and the web.

Just wondering if anyone has any knowledge of being able to do a if inside a Grid Column  The end goal i'm trying to achieve is if a value is contained within the the property of the CurrentRecord then a button will appear binding to a function, if no record appears then the cell would remain empty.

this is the code i'm bodged together

    <TelerikGrid data="@Histories" height="600px" Pageable="true" PageSize="20" Sortable="true" Filterable="true">
        <TelerikGridColumns>
            <TelerikGridColumn Field="Casecode" />
            <TelerikGridColumn Field="Historytext" />
            <TelerikGridColumn Field="Createdate" Title="Create Date" />
            <TelerikGridColumn>
                <Template>
                    @{ 
                        CurrentRecord = context as CaseHistory;
                        if(CurrentRecord.Blobid > 0)
                        {
                            <TelerikButton>Open</TelerikButton>
                        }
                     }
                </Template>

            </TelerikGridColumn>
        </TelerikGridColumns>
    </TelerikGrid>

 

 

at the moment when i'm running the code the command brower is showing an error 

 

Error: System.ArgumentNullException: Value cannot be null.
Parameter name: name
   at System.Type.GetProperty(String name, BindingFlags bindingAttr)
   at Telerik.Blazor.Components.Grid.TelerikGridFilterHeaderBase`1.get_PropInfo()
   at Telerik.Blazor.Components.Grid.TelerikGridFilterHeaderBase`1.get_PropType()
   at Telerik.Blazor.Components.Grid.TelerikGridFilterHeaderBase`1.get_PropTypeName()
   at Telerik.Blazor.Components.Grid.TelerikGridFilterHeaderBase`1.ResetFilterText()
   at Telerik.Blazor.Components.Grid.TelerikGridFilterHeaderBase`1.OnInit()
   at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()

 

any help to point me in a direction would help.

Thanks

Richard

Richard
Top achievements
Rank 1
 answered on 06 Jun 2019
8 answers
895 views

Hi,

I appreciate it's still under development so maybe what I ask is unavailable, but I have a couple of questions about the grid:

 

1. If I have a lot of columns can I set the size of the columns and have the grid display a horizontal scrollbar.

2. I'm having trouble getting sorting working with templated columns:

It doesn't seem to work at all when I just set the Items and when using the ReadItems method, which is ultimately what I want to do the sort descriptor is passed in but the sort descriptor member field is empty (the sort direction does contain a value). Do I need to set something on the column template as a sort value or something?

Thanks,
Nick

Marin Bratanov
Telerik team
 answered on 06 Jun 2019
3 answers
567 views

Hello,

I have edited the code below to remove a lot of the non-relevant parts. In summary I have a TelerikDropDownList within a TelerikGrid EditorTemplate within a TelerikWindow. When I click "Add" in the grid a NullReferenceException exception is thrown (full Exception text at the bottom of the post). If I comment out the DropDownList control completely, the exception is not thrown when I click "Add".

<TelerikWindow>
    <TelerikWindowContent>
        <TelerikGrid Data=@ScheduledJobs EditMode="inline">
            <TelerikGridToolBar>
                <TelerikGridCommandButton Command="Add" Icon="add"></TelerikGridCommandButton>
            </TelerikGridToolBar>
            <TelerikGridColumns>
                <TelerikGridColumn Field=@nameof(ScheduledJob.JobActionName) Title="Action">
                    <EditorTemplate>
                        @{
                            JobToEdit = context as ScheduledJob;
                            <TelerikDropDownList DefaultItem="@DefaultJobAction" Data="@JobActions" bind-Value=@JobToEdit.JobAction ValueField="@nameof(JobAction.Id)" TextField="@nameof(JobAction.Name)"></TelerikDropDownList>
                           }

...

@functions {

  protected List<JobAction> JobActions = <code to populate JobActions list>

  protected DefaultJobAction = JobActions[0];  // I have debugged - this assigns a non-null object as expected

  protected JobToEdit JobToEdit;  // has a field called JobAction of type JobAction

}

The full exception text is:

System.NullReferenceException: Object reference not set to an instance of an object. at string Telerik.Blazor.Common.TelerikSelectBase<TValue>.get_CurrentValueAsString() at void Telerik.Blazor.Components.DropDownList.TelerikDropDownList<TItem, TValue>.BuildRenderTree(RenderTreeBuilder builder) at Microsoft.AspNetCore.Components.ComponentBase()+(RenderTreeBuilder builder) => { } at void Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment) at void Microsoft.AspNetCore.Components.Rendering.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry) at void Microsoft.AspNetCore.Components.Rendering.Renderer.ProcessRenderQueue()

Marin Bratanov
Telerik team
 answered on 04 Jun 2019
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?