Telerik Forums
UI for Blazor Forum
2 answers
589 views

I get the following error when attempting to remove an uploaded file. I'm using the example code from the Upload Overview Document https://docs.telerik.com/blazor-ui/components/upload/overview?_ga=2.20672573.407168315.1585784320-1941347284.1557871324

 

VS 2019 Output Window.

Failed to load resource: the server responded with a status of 415 () [https://localhost:44326/api/upload/remove]

Microsoft.AspNetCore.Routing.EndpointMiddleware: Information: Executed endpoint 'TestUpload.Controllers.UploadController.Remove (TestUpload)'
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request finished in 69.8482ms 415 application/problem+json; charset=utf-8

 

Browser Console.

telerik-blazor.js:39 POST https://localhost:44326/api/upload/remove 415
value @ telerik-blazor.js:39
value @ telerik-blazor.js:39
value @ telerik-blazor.js:39
value @ telerik-blazor.js:39
value @ telerik-blazor.js:39
u @ telerik-blazor.js:1
(anonymous) @ blazor.server.js:8
beginInvokeJSFromDotNet @ blazor.server.js:8
(anonymous) @ blazor.server.js:1
e.invokeClientMethod @ blazor.server.js:1
e.processIncomingData @ blazor.server.js:1
connection.onreceive @ blazor.server.js:1
i.onmessage @ blazor.server.js:1

 

Marin Bratanov
Telerik team
 answered on 03 Apr 2020
1 answer
522 views

Hi,

Our company is evaluating Telerik's Blazor grid for our project, and it's looking like Telerik has just about all the features we need. One thing we would very much like is multi-column sort, but I didn't see that as an option currently.

Is multi-column sorting something that is available but not documented? Or is it on the roadmap? If it's on the roadmap, that would be awesome.

Eyup
Telerik team
 answered on 03 Apr 2020
5 answers
730 views

Posting it here since it is related to the menu items.  Is there a way to show bread crumbs on the menu items?

 

Thanks.

Marin Bratanov
Telerik team
 answered on 02 Apr 2020
2 answers
3.4K+ views

Hi,

Can someone share an example of how to get an image from a FileStream'ed table in sqlserver into a column on a grid?

Thanks … Ed

 

Ed
Top achievements
Rank 1
Iron
Veteran
Iron
 answered on 01 Apr 2020
2 answers
607 views

I was hoping to put some icons in the Text section of the menu component.  

 

On regular nav link I can do this.

    <NavLink class="dropdown-item" href="settings/accountcategories">
                <span class="oi oi-command" aria-hidden="true"></span> Account Categories
            </NavLink>

 

Thanks.

SL
Top achievements
Rank 1
Veteran
 answered on 31 Mar 2020
3 answers
547 views

Hi

How do I create a chart. I want bind a single value / a percentage - like 66%  (.66).

For example disk space remaining. I have Drive object with PercentFree.

When this renders I get a full blue pie chart.  Enclosed is 8 percent

 

 

 <TelerikChart Width="100%" Height="100%" Transitions="false" RenderAs="@RenderingMode.SVG">
            <ChartSeriesItems>
                <ChartSeries Type="ChartSeriesType.Pie"
                             Data="@DriveData"
                             Field="@nameof(Drive.PercentFree)"
                             CategoryField="@nameof(Drive.Name)"
                             ExplodeField="@nameof(Drive.Explode)">
                    <ChartSeriesLabels Visible="true"></ChartSeriesLabels>
                </ChartSeries>
            </ChartSeriesItems>

        <ChartLegend Position="ChartLegendPosition.Right">
        </ChartLegend>
    </TelerikChart>

Marin Bratanov
Telerik team
 answered on 31 Mar 2020
2 answers
404 views

     I'm using EditorTemplates in my TelerikGrid to display drop down lists to the user.  I've been using ObservableCollections to gather the data from my API and populate the list which was working until I updated to v2.9.0 to take advantage of GridState.  

I've used Console.WriteLine to confirm that the ObservableCollection does in fact have the data, but when inspecting the <span> element in the browser, no options have been populated.  I thought perhaps my implementation of GridState had an effect; however, removing that resulted in no change in behavior.  The DefaultText renders correctly as well as any records that match an available option.  But the drop down list will not drop down when I click on it to display any options.  Here's an abbreviated version of my code:

 

<TelerikGrid Data=@GridData EditMode="@GridEditMode.Inline" Class="smallerFont"
             Height="600px" RowHeight="50" PageSize="20"
             Pageable="true"
             Sortable="true"
             FilterMode="@GridFilterMode.FilterRow"
             OnRead=@ReadItems
             TotalCount=@Total
             OnUpdate=@UpdateItem
             OnEdit="@EditHandler"
             OnStateInit="@((GridStateEventArgs<ProjectView> args) => OnStateInit(args))">
    <GridColumns>
...
        <GridColumn Field=@nameof(ProjectView.Processor) Editable="true">
            <EditorTemplate>
                @{
                    <TelerikDropDownList DefaultText="Please Select" Data="@ProcessorList" TextField="Name" ValueField="Name" @bind-Value="(context as ProjectView).Processor" />
                }
            </EditorTemplate>
        </GridColumn>
        <GridColumn Field="@nameof(ProjectView.JobStatus)" Editable="true" Filterable="false">
            <EditorTemplate>
                @{
                    <TelerikDropDownList DefaultText="Please Select" Data="@StatusList" TextField="JobStatus" ValueField="JobStatus" @bind-Value="(context as ProjectView).JobStatus" />
                }
            </EditorTemplate>
        </GridColumn>
...
</GridColumns>
...
</TelerikGrid>
 
@code {
 
    public ObservableCollection<ProjectView> GridData { get; set; } = new ObservableCollection<ProjectView>();
    public ObservableCollection<DdfCorsiProcessor> ProcessorList { get; set; } = new ObservableCollection<DdfCorsiProcessor>();
    public ObservableCollection<DdfJobStatus> StatusList { get; set; } = new ObservableCollection<DdfJobStatus>();
 
    public int Total { get; set; } = 0;
    string appStatus;
 
    private async Task EditHandler(GridCommandEventArgs args)
    {
        ODataClient client = new ODataClient(AppSetting.ODataURL);
        var batch = new ODataBatch(client);
        IEnumerable<DdfCorsiProcessor> processors = null;
        IEnumerable<DdfJobStatus> jobStatuses = null;
        if (ProcessorList.Count() == 0)
        {
            batch += async c => processors = await c.For<DdfCorsiProcessor>("Processors")
                .OrderBy("Name")
                .FindEntriesAsync();
        }
 
        if (StatusList.Count() == 0)
        {
            batch += async c => jobStatuses = await c.For<DdfJobStatus>("JobStatuses")
                .Filter(x => x.Brand == "Greenfield")
                .FindEntriesAsync();
        }
 
        if (ProcessorList.Count() == 0 || StatusList.Count() == 0)
        {
            await batch.ExecuteAsync();
            if (processors != null)
                foreach (var processor in processors)
                {
                    ProcessorList.Add(processor);
                }
 
            if (jobStatuses != null)
                foreach (var status in jobStatuses)
                {
                    StatusList.Add(status);
                }
 
            foreach (var processor in ProcessorList)
                Console.WriteLine(processor.Name);
        }
    }
Tyler
Top achievements
Rank 1
 answered on 31 Mar 2020
1 answer
929 views

Hi,

 

I'm getting a 404 error on the static resource styles from the assembly "Telerik.UI.for.Blazor.Trial"

My path is "_content/Telerik.UI.for.Blazor.Trial/css/kendo-theme-default/all.css" as per your online guide.

(https://docs.telerik.com/blazor-ui/getting-started/what-you-need)

 

The styles for my own RCL are served just fine using the same methodology.

 

I'm trying to assess the viability of the toolset for a customer and this isn't a great start...

Marin Bratanov
Telerik team
 answered on 31 Mar 2020
2 answers
1.3K+ views

I've tried getting this to work a number of ways, but it appears that using the 'ValueChanged' event with the Telerik TextBox is incompatible with <EditForm>.

The attached code generates an error using the <EditForm> tag.  Works fine if its commented out. The TextBox works fine with EditForm but without ValueChanged defined.  Any ideas?

@page "/testpage"
 
<EditForm Model="contactName" OnValidSubmit="OnValidSubmit">
    <DataAnnotationsValidator />
 
    from the handler: @result
    <br />
    from model: @contactName.LastName
    <br />
 
    <TelerikTextBox ValueChanged="@( (string s) => MyValueChangeHandler(s) )"
                    Value="@contactName.LastName">
    </TelerikTextBox>
 
    @*<TelerikTextBox @bind-Value="@contactName.LastName"/>*@
 
    <ValidationMessage For="@(() => contactName.LastName)" />
 
    <div>
        <button class="btn btn-primary" type="submit">OK</button>
 
    </div>
 
</EditForm>
 
 
@code {
    string result;
    public Contact contactName { get; set; } = new Contact();
 
    private void MyValueChangeHandler(string theUserInput)
    {
        result = string.Format("The user entered: {0}", theUserInput);
 
        //you have to update the model manually because handling the ValueChanged event does not let you use @bind-Value
        contactName.LastName = theUserInput;
    }
 
    private void OnValidSubmit()
    {
        result = "Form Submitted";
    }
 
    public class Contact
    {
        public int NameId { get; set; }
        public string FirstName { get; set; }
 
        [System.ComponentModel.DataAnnotations.Required(ErrorMessage = "You must enter a Last Name.")]
        public string LastName { get; set; }
    }
}
Michael
Top achievements
Rank 1
Veteran
 answered on 30 Mar 2020
1 answer
2.3K+ views
Does anyone have an example of how to use a tooltip in a grid? I would like to put a tooltip on a GridCommandButton but I can't seem to figure out how to do that.
Marin Bratanov
Telerik team
 answered on 28 Mar 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?