Telerik Forums
UI for Blazor Forum
1 answer
170 views
I used to use Syncfusion Grid for blazor.  It had an option to automatically draw the columns vertically.  So your column row would be on the left and 1 row of data would be on the right.  How can I do this with Telerik Blazor Grid?  Is it even possible?
Dimo
Telerik team
 answered on 04 Sep 2024
1 answer
173 views

Hello Telerik,

I am attempting to trial the Blazor UI.  I am able to get the Telerik Button to work but not the Grid.  See Error below.  I have included the Repo on GitHub.

Thank you for your help.

GitHub Repo Multiple components use the tag 'TelerikGrid'. Components

 


Dimo
Telerik team
 answered on 02 Sep 2024
1 answer
112 views

Hi,

I was wondering the reason for this change?  I can have many LoaderContainers on my screen, and now if a dialog appears, depending on positioning it may or may not be hidden -- and sometimes even just partially hidden!  

Example: https://blazorrepl.telerik.com/mSEsmjbL50qFUO1p20

Depending on your window size you may or may not be able to click OK!

Dimo
Telerik team
 answered on 02 Sep 2024
1 answer
79 views

Hello,

I'm using a TelerikPopover with an AnchorSelector that references a class name. When the user clicks on an element with that class name the Popover show properly and to the right of that element. However, if I want to programmatically display the Popover using PopoverRef.Show(), the popover will display to the right of the first element with that selector. Is there a way for me to have to Popover display at a specific element?

 

Thank You,

-Andy

Dimo
Telerik team
 answered on 02 Sep 2024
1 answer
176 views

hi.

I just now updated through NuGet to 6.0.2 and started seeing this message on the TelerikUpload  component. 

How should I resolve this?  I am uploading large files 

Thanks

 

Unable to set property 'MaxFileSize' 
on object of type 'Telerik.Blazor.Components.TelerikUpload'. The error was: Specified cast is not valid.

System.InvalidOperationException: Unable to set property 'MaxFileSize' 
Dimo
Telerik team
 answered on 30 Aug 2024
1 answer
68 views

How do I format field labels in the grid popup edit form?  I want to style the labels on a popup edit form.  I also would like to associate the labels with fields.

 


<GridColumn Field="@nameof(ParticipantVM.ParticipantCode)" Width="100px" Filterable=true>
<EditorTemplate>
 @{
                            var item = (ParticipantVM)context;
                            <div @onkeydown:stopPropagation>
 <TelerikTextBox @bind-Value="@item.ParticipantCode" Id="pcode" Placeholder="Enter a Code" DebounceDelay="0" />
 </div>
 }
     </EditorTemplate>
 </GridColumn>

Dimo
Telerik team
 answered on 30 Aug 2024
2 answers
328 views

Hello, i was wondering if it is possible to bind and display data in a column from a List/Array of data like this:

public record Item
{
    public string Name { get; set; }
    public List<int> CostsAtMonths  { get; set; } = new();
    public int[] CostsAtMonths { get; set; }
}

Then have it displayed in in a TreeList with a column for each month of the year, where each column points to an item of the list/place in an array like this:

Hatef
Top achievements
Rank 1
Iron
 answered on 29 Aug 2024
1 answer
132 views

I am still struggeling with CSS. 

I want to set the Backgroundcolor and the Link/Text-Color of a specific Menu-Component. I know who to style the Menu generally for the whole Application but I need it just for one Page. The Menu-Component has no explicit Style Attribut to set in inline just for the specific object.

This is the way I style the Link-Color but it sets the color for all my Menus...    

.k-menu-link {
        color: red;
}

Any help ?

 

Hristian Stefanov
Telerik team
 answered on 29 Aug 2024
1 answer
95 views

Hi Everyone,

I am trying to include a component in my TelerikForm which will contain a <FormGroup>, <FormItems> and all the bits for a mailing address.  This has been giving me some grief and I would love some help.  Here's what I have: 

Here's the outside component:

@page "/agencies/new"
@using kpow.interfaces.Services.Agencies
@using kpow.Ui.Components
@inject IAgencies AgencyService

<TelerikForm EditContext="formContext">
    <FormValidation>
        <DataAnnotationsValidator></DataAnnotationsValidator>
        <TelerikValidationSummary />
    </FormValidation>
    <FormItems>
        <FormItem Field="@nameof(Agency.Name)" LabelText="Name" />
        <FormItem Field="@nameof(Agency.AgencyType)" LabelText="Agency Type" />

        <AddressSubForm
            Address="@Agency.Address"
            SetAddress="address => Agency.Address = address"/>
    </FormItems>
</TelerikForm>
@code {
    private Agency Agency { get; } = new() { Address = new Address() };
    EditContext formContext { get; set; }

    protected override void OnInitialized()
    {
        formContext = new EditContext(Agency);
        base.OnInitialized();
    }
}

 

Here's the AddressSubForm Component:

 

@inject interfaces.Services.Ports.ICountries CountryService
<FormGroup LabelText="Address">
  <FormItem Field="@nameof(Address.ToLine)" LabelText="ToLine" ></FormItem>
    <FormItem Field="@nameof(Address.Street1)" LabelText="Street"></FormItem>
    <FormItem Field="@nameof(Address.Street2)" LabelText="Street 2"></FormItem>
    <FormItem Field="@nameof(Address.City)" LabelText="City"></FormItem>
    <FormItem Field="@nameof(Address.PostalCode)" LabelText="Postal Code"></FormItem>
@if (ShowRegions == true)
{
    <FormItem Field="@nameof(RegionId)" LabelText="Region">
        <Template>
            <TelerikDropDownList Data="@regions"
                                 TextField="Name"
                                 ValueField="Id"
                                 @bind-Value="RegionId">
            </TelerikDropDownList>
        </Template>
    </FormItem>
}
    <FormItem Field="@nameof(CountryId)" LabelText="Country">
        <Template>
            <TelerikDropDownList Id="cbCountries"
                                 TextField="Name"
                                 ValueField="Id"
                                 Data="@countries"
                                 OnChange="CountryChanged"
                                 @bind-Value="CountryId">
            </TelerikDropDownList>
        </Template>
    </FormItem>
</FormGroup>

@code {
    [Parameter] public Address Address { get; set; } = new Address();
    [Parameter] public Func<Address, Address>? SetAddress { get; set; }

    private IEnumerable<Country>? countries { get; set; }
    private IEnumerable<Region>? regions { get; set; }
    private bool ShowRegions { get; set; } = false;

    private string ToLine { get; set; } = string.Empty;
    private string Street1 { get; set; } = string.Empty;
    private string? Street2 { get; set; } = string.Empty;
    private string City { get; set; } = string.Empty;
    private int? RegionId { get; set; } = null;
    private string PostalCode { get; set; } = string.Empty;
    private int? CountryId { get; set; } = null;

    protected override async Task OnInitializedAsync()
    {
        ToLine = Address.ToLine;
        Street1 = Address.Street1;
        Street2 = Address.Street2;
        City = Address.City;
        RegionId = Address.RegionId;
        PostalCode = Address.PostalCode;
        CountryId = Address.CountryId;

        countries = await CountryService.GetAll();
    }



    private async Task CountryChanged(object value)
    {
        CountryId = (int)value; // Ensure CountryId is updated
        Address = SetAddress(Address with { CountryId = (int)value, RegionId = null });

        switch (CountryId)
        {
            case 185: //usa
            case 32:  //canada
                {
                    regions = await CountryService.GetRegions(CountryId.Value);
                    ShowRegions = true;

                    break;
                }
            default:
                {
                    ShowRegions = false;

                    break;
                }
        }

    }

    private void RegionChanged(object value)
    {
        Address = SetAddress(Address with { RegionId = (int)value });
    }

}

 

When this runs, I can see the rendered labels in the right place for the Address, but the countries drop down is not filled even though the data is present in the OnInitializedAsync when it calls await CountryService.GetAll();   Also, none of the form fields in Address render - only the label.  There is an error in console per field in the Address component that is not using a template: 

crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: Value cannot be null. (Parameter 'For')
System.ArgumentNullException: Value cannot be null. (Parameter 'For')
   at Telerik.Blazor.Components.Common.BaseComponent.ThrowIfParameterIsNull(Object argumentValue, String argumentName)
   at Telerik.Blazor.Components.Validation.ValidationMessageBase`1[[System.Object, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].OnParametersSet()
   at Microsoft.AspNetCore.Components.ComponentBase.CallOnParametersSetAsync()
   at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()

I'm looking forward to hearing your ideas!  Thanks!

-scott

 

                                      
Nadezhda Tacheva
Telerik team
 answered on 28 Aug 2024
1 answer
60 views

Hi, I am using StockChartNavigator, Have 2 questions

1) How to change the area chart background color

2) How to call a function when user change the range selection using handles. I want to change some label values on my component based on date range

 

 

Hristian Stefanov
Telerik team
 answered on 26 Aug 2024
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?