Telerik Forums
UI for Blazor Forum
1 answer
1.0K+ views

Do you have or planned to add a QueryBuilder component similar to the one that Syncfusion have? 

 

https://www.syncfusion.com/blazor-components/blazor-query-builder

 

Marin Bratanov
Telerik team
 answered on 16 Dec 2020
5 answers
751 views
<TelerikTimePicker Value="(DateTime?)null" Format="t" />

is showing the null DateTime as "t", not as an empty string.

How do I prevent this?

 

 

Marin Bratanov
Telerik team
 answered on 15 Dec 2020
2 answers
774 views

I am looking for a way to change the toggle buttons icon on the TelerikDropdownList. I see in other versions there is a "DropdownButton" available. Is there a way to do that in the Blazor versions current state or is this a feature I need to propose?

Thanks.

Blane Bunderson
Top achievements
Rank 1
 answered on 14 Dec 2020
2 answers
872 views

I have a need to show additional details about a row of data and would like it to show within the grid.  To do this, I have used a hierarchical grid and I load the data using the OnRowExpand event.  Unfortunately, the grid's template is not updated after the model is updated.  Can you recommend a better approach to accomplish this?

Thanks,

 

Doug

@page "/po/{PoNumber}"
@attribute [Authorize]
@inject Layer3.Data.DataAccess.ERP.IPgDataAccess _db;
@using System.Linq;
@using Layer3.Data.Models.ERP.PO;

@if (Loading)
{
    <Waiting Message="@LoadingMessage" />
}

@if (NotFound)
{
    <div class="alert alert-danger" role="alert">
        <strong>@PoNumber</strong> was not found!
    </div>
}

<div class="card">
    <div class="card-header">
        <h3>
            PO #@PoNumber for <strong>@PO?.ProjectName</strong>
            <button type="button" class="close" aria-label="Close" @onclick="@(() => OnClose.InvokeAsync(InventoryTabModel))">
                <span aria-hidden="true">&times;</span>
            </button>
        </h3>
    </div>
    <div class="card-body">
        @if (PO != null)
        {
            <dl class="row">
                <dt class="col-sm-2">Vendor</dt>
                <dd class="col-sm-10">@PO.Vendor</dd>
                <dt class="col-sm-2">Order Date</dt>
                <dd class="col-sm-10">@PO.OrderDate</dd>
                <dt class="col-sm-2">Status</dt>
                <dd class="col-sm-10">@PO.Status</dd>
                <dt class="col-sm-2">Comments</dt>
                <dd class="col-sm-10">@((MarkupString)PO.Comments.Replace("\n", "<br />"))</dd>
            </dl>
        }

        @if (Lines != null)
        {
            <TelerikGrid Data="@Lines" Sortable="false" Pageable="false" OnRowExpand="@OnRowExpandHandler">
                <GridColumns>
                    <GridColumn Field=@nameof(PoItem.LineNumber) />
                    <GridColumn Field=@nameof(PoItem.Status) />
                    <GridColumn Field=@nameof(PoItem.ItemNumber) />
                    <GridColumn Field=@nameof(PoItem.Manufacturer) />
                    <GridColumn Field=@nameof(PoItem.Config) />
                    <GridColumn Field=@nameof(PoItem.QtyOrdered) />
                    <GridColumn Field=@nameof(PoItem.QtyReceived) />
                    <GridColumn Field=@nameof(PoItem.QtyReturned) />
                    <GridColumn Field=@nameof(PoItem.SoNumber) />
                </GridColumns>
                <DetailTemplate Context="LineContext">
                    @{
                        var line = LineContext;

                        @if (line.Serialized)
                        {
                            <dl class="row">
                                <dt class="col-sm-2">In Inventory</dt>
                                <dd class="col-sm-10">@line.InInventory</dd>
                                <dt class="col-sm-2">Shipped</dt>
                                <dd class="col-sm-10">@line.Shipped</dd>
                                <dt class="col-sm-2">Serial Swapped</dt>
                                <dd class="col-sm-10">@line.SerialSwapped</dd>
                            </dl>
                        }
                        else
                        {
                            <span>Not serialized</span>
                        }
                    }
                </DetailTemplate>
            </TelerikGrid>
        }
    </div>
</div>

@code {
    [Parameter]
    public string PoNumber { get; set; }

    [Parameter]
    public bool ShowClose { get; set; } = false;

    [Parameter]
    public EventCallback<ProjectInventory.TabModel> OnClose { get; set; }

    [Parameter]
    public ProjectInventory.TabModel InventoryTabModel { get; set; }

    [Parameter]
    public EventCallback<ProjectInventory.OpenTabEventArgs> OnTabOpen { get; set; }

    private string LoadingMessage { get; set; }
    private bool Loading { get; set; } = false;
    private bool NotFound { get; set; } = false;
    private Layer3.Data.Models.ERP.PO.PO PO { get; set; }
    private List<Layer3.Data.Models.ERP.PO.PoItem> Lines { get; set; }

    protected override async Task OnParametersSetAsync()
    {
        LoadingMessage = $"Searching for PO #{PoNumber}...";
        Loading = true;

        try
        {
            Layer3.Data.DataAccess.ERP.PO po = new Layer3.Data.DataAccess.ERP.PO(_db);
            PO = await po.GetPoAsync(PoNumber);
            Lines = await po.GetPoLinesAsync(PoNumber);
        }
        finally
        {
            Loading = false;
        }
    }

    async void OnRowExpandHandler(GridRowExpandEventArgs args)
    {
        var line = args.Item as Layer3.Data.Models.ERP.PO.PoItem;

        if (line.Serialized && line.SerialAudits == null)
        {
            // get serials received
            LoadingMessage = $"Getting serials receive for Line #{line.LineNumber}...";
            Loading = true;

            try
            {
                Layer3.Data.DataAccess.ERP.PO po = new Layer3.Data.DataAccess.ERP.PO(_db);
                line.SerialAudits = await po.GetSerialAuditsAsync(PoNumber, line.LineNumber);
            }
            finally
            {
                Loading = false;
            }
        }
    }
}

Doug
Top achievements
Rank 1
Veteran
 answered on 11 Dec 2020
9 answers
472 views

Hi, Is there an estimation to have Scheduler for Blazor?

I need to do a timeline view of activity per user where you have a bar with different colours to represent different status during that time. Would that be possible to do with the scheduler timeline view?

I have attached a screenshot of something similar to what i want to do. Could you advise if this will be available for scheduler for blazor and when?

Thanks!

Marin Bratanov
Telerik team
 answered on 10 Dec 2020
1 answer
4.0K+ views

Here is my code:

01.<TelerikGrid Data="_enrollments"
02.                 AutoGenerateColumns="false"
03.                 PageSize="5"
04.                 ScrollMode="@GridScrollMode.Scrollable"
05.                 Height="400px"
06.                 RowHeight="40"
07.                 SortMode="@SortMode.Multiple"
08.                 Sortable="true">
09.        <GridColumns>
10.            <GridColumn Field="@nameof(EnrollmentDTO.Id)" />
11.        </GridColumns>
12.        <DetailTemplate>
13.            @{
14.                var category = context as EnrollmentDTO;
15.                <TelerikGrid Data="@category.Device"
16.                             Height="300px"
17.                             Pageable="true"
18.                             Sortable="true"
19.                             PageSize="5"
20.                             AutoGenerateColumns="true">
21.                </TelerikGrid>
22.            }
23.        </DetailTemplate>
24.    </TelerikGrid>

 

If I remove the DetailTemplate this works fine. Otherwise I get the following errors 

CS1662 Cannot convert lambda expression to intended delegate type because some of the return types in the block are not implicitly convertible to the delegate return type

--and--

CS0411 The type arguments for method 'TypeInference.CreateTelerikGrid_1<TItem>(RenderTreeBuilder, int, int, IEnumerable<TItem>, int, string, int, bool, int, bool, int, int, int, bool)' cannot be inferred from the usage. Try specifying the type arguments explicitly.

I cannot figure out what is going on.


David
Top achievements
Rank 3
Iron
Iron
Veteran
 answered on 10 Dec 2020
1 answer
180 views

Please see the attached image.

I don't have any idea what caused this. I can't figure out how this could have happened. Can someone show me how to add some css to move the 'X' over a bit?

Thanks ... Ed

 

Nadezhda Tacheva
Telerik team
 answered on 09 Dec 2020
1 answer
199 views

Is there anyway to delay the showing of the toolip when showing on hover?

I want it to only show the toolip tip if I hover over an item for more than some time period (i.e. 3 seconds)

 

Kristian
Telerik team
 answered on 09 Dec 2020
1 answer
1.2K+ views

Hi everyone,

By setting the property Expanded equal to true in the collection the treeview does not expand anymore. This was working before but now, it doesn't.

To explain you more precisely what I have done: in the model I have the property Expanded. On double click on the node (not on the arrow in front of the node) I'am am setting the Expanded property to true if the node is closed or if the node is opened I'm setting the Expanded property to false. This was working before, but now it doesn't. Have you changed something for this component?

How can I fix this issue? Can you help me please?

 

Best regards,

Cipri

Marin Bratanov
Telerik team
 answered on 09 Dec 2020
1 answer
463 views
In the WASM Blazor app I'm working on, there is a centralized/global unhandled-exception handler that we leverage in order to avoid having to try/catch all over the place. For some reason, the Grid's `OnRead` event/handler seems to be swallowing exceptions, thus circumventing the aforementioned centralized handler.

Here is an example, using the bog-standard Blazor WASM template that demonstrates what I mean. Any suggestions on what to try to have exceptions that may occur in OnRead to bubble-up like everything else is? Thanks in advance.

@page "/fetchdata"
@using BlazorUnhandled.Shared
@inject HttpClient Http

    <TelerikGrid Data=@forecasts AutoGenerateColumns="true" OnRead="@GridOnRead">
        
    </TelerikGrid>
@code {
    private WeatherForecast[] forecasts;

    protected override async Task OnInitializedAsync()
    {
        // This (when uncommented) results in the expected behaviour of the Blazor error handler doing what it's supposed to
        //throw new Exception("bad thing from OnInitializedAsync");        
    }

    protected async Task GridOnRead(GridReadEventArgs args) {
        var results = await Http.GetFromJsonAsync<WeatherForecast[]>("WeatherForecast");
        // This does _NOT_ result in the expected behaviour of the Blazor error handler:
        throw new Exception("bad thing from GridOnRead");
        forecasts = results;
        StateHasChanged();
    }
}

Bozhidar
Telerik team
 answered on 09 Dec 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?