Telerik Forums
UI for Blazor Forum
2 answers
98 views
I would like to use the TelerikMenu on a mobile device, but there is no hover function to automatically open the menu. I therefore use ShowOn=“@MenuShowEvent.Click”. This also works, but now CloseOnClick=“true” no longer works. If I use the property, the menu no longer opens at all. But I need the function to close the menu automatically after selecting a menu item. How can I achieve this or is it a bug?

Hendrik
Top achievements
Rank 2
Bronze
Iron
Iron
 answered on 15 Oct 2024
1 answer
161 views
I would like to display the result of a dynamic SQL query, which therefore cannot be typed, in a grid. I tried it with AutoGenerateColumns=“true”, but it didn't work. I load my data into an IEnumerable<dynamic>. Is there a solution for this ?
Dimo
Telerik team
 answered on 15 Oct 2024
1 answer
136 views

Hi, my goal is validate a form and focus telerik widget with validation errors.  

 

Now i can find the element search for class "k-invalid" but how to get the widget reference so i can call the FocusAsync() method?

 

Thanks

2 answers
305 views
I have a cases where I need the users to be able to change the date and time, but mostly will just be editing the time?  Is there a way to default open to the Time Page rather than opening the date page every time?
Andrew
Top achievements
Rank 2
Iron
 answered on 11 Oct 2024
1 answer
137 views

I am trying to convert implement the TelerikTabStrip and was largly successful however I have a component that contains conditional logic that adds between 0 and 2 additional tabs to the parent components tabStrip. Unfortuately these tabs are not rendering correctly. I was able to replicate a minimum reproducable example in the blazor REPL environment using the following code. Are you able to advise how I can add tabs to a parents tabstrip, my two rendering issues are:

  1. When PersistTabContent is true (works as expected when false) the tabs don't render any content (I need the tabs to persist so turning it off isn't a good fix); and
  2. Regardless of if the tabs are persistant or not the subComponent tabs are still shown as "Active" and show the tabs as selected causing the appearence of multiple selected tabs 

Main.razor

<TelerikTabStrip PersistTabContent="true">
    <TabStripTab Title="tab1">
        <p>tab1 content</p>
    </TabStripTab>
    <TabStripTab Title="tab2">
        <p>tab2 content</p>
    </TabStripTab>
    <TabStripTab Title="tab3">
        <p>tab3 content</p>
    </TabStripTab>
    <SubComponent />
</TelerikTabStrip>

SubComponent.razor

<TabStripTab Title="tab4">
    <p>tab4 content</p>
</TabStripTab>
<TabStripTab Title="tab5">
    <p>tab5 content</p>
</TabStripTab>

Screenshots:

initial render:

Clicking on tab 1, 2 or 3 works as expected:

clicking on 4 or 5 shows no content:

Then clicking back to 1, 2 or 3 shows 4 and/or 5 as still selected:

 

 


Yanislav
Telerik team
 answered on 11 Oct 2024
1 answer
177 views
The docs/demos use the classic list of Employee class as data source, but what if the data source is an ExpandoObject instead? I've tried a few things, but the expanded group only fetches one row, and sometimes no rows at all. I'd love to hear if anyone has got this working?
Tsvetomir
Telerik team
 answered on 11 Oct 2024
1 answer
139 views

Severity Code Description Project File Line Suppression State
Error (active) NU1107 Version conflict detected for Telerik.Zip. Install/reference Telerik.Zip 2023.1.307 directly to project Project1  to resolve this issue. 
 Project1  -> Telerik.UI.for.Blazor 4.1.0 -> Telerik.Documents.SpreadsheetStreaming 2023.1.307 -> Telerik.Zip (= 2023.1.307) 
 Project1 -> Telerik.Documents.Spreadsheet.FormatProviders.OpenXml 2023.1.104 -> Telerik.Zip (= 2023.1.104). Project1 C:\Work\Projects\Project1 \Project1.csproj 1

 

My project is referenced to

  <PackageReference Include="Telerik.Documents.Spreadsheet.FormatProviders.OpenXml" Version="2022.2.613" />
  <PackageReference Include="Telerik.Documents.SpreadsheetStreaming" Version="2022.2.613" />
  <PackageReference Include="Telerik.UI.for.Blazor" Version="3.4.0" />

 

But I am not able to find them in Nuget

Dimo
Telerik team
 answered on 10 Oct 2024
1 answer
107 views

I am working on a Blazor Auto application using the Upload component to upload images for a product for various properties in a SaaS type system.

I found that when I adjust the save point in the application at runtime the SaveUrl does not seem to retain the value.

For example:


SaveImageUrl = $"api/property/{TenantSelectionService.SelectedTenant.Id}/product-types/{TypeCode}/images";

<TelerikUpload AllowedExtensions="@(new List<string>() {".jpg", ".jpeg", ".webp" })"
                   SaveUrl="@SaveImageUrl"
                   WithCredentials="true"
                   OnUpload="@OnUploadAsync">

This is set in two locations, OnAfterRender as well as OnTenantSelectionChanged event.

When using this method, it appears that the Upload component does not retain the SaveUrl for some reason. When examining the JavaScript, the URL is always blank.  

I did manage to alter the URL to a static version and pass data as a header.

Is this something that can be looked into or maybe I am doing it wrong.

Dimo
Telerik team
 answered on 10 Oct 2024
1 answer
85 views
Is it possible to define a template for the Scheduler Grouping elements? I can't see anything in the docs for this.

I want to change the background colour and, if possible, include an image.

This is the section of the control I am talking about:

Hristian Stefanov
Telerik team
 answered on 09 Oct 2024
1 answer
137 views

Hi,

We've implemented group load on demand in a grid and the rows in each group are editable. Is is possible to maintain the expanded state of a group after a row has been edited?

I've amended the code in Toggle Group Load Mode at Runtime to show an example of the issue we have.

 

@using Telerik.DataSource

<p>
    <label>
        <TelerikCheckBox Value="@GridLoadGroupsOnDemand"
                         ValueChanged="@GridLoadGroupsOnDemandChanged"
                         TValue="@bool" /> Load Groups On Demand
    </label>
</p>

<TelerikGrid @ref="@GridRef"
             Data="@GridData"
             TItem="@Employee"
             Pageable="true"
             Sortable="true"
             Groupable="true"
             LoadGroupsOnDemand="@GridLoadGroupsOnDemand"
             FilterMode="GridFilterMode.FilterRow"
             OnStateInit="@OnGridStateInit"
             EditMode="@GridEditMode.Inline">
    <GridColumns>
        <GridColumn Field="@nameof(Employee.Name)" />
        <GridColumn Field="@nameof(Employee.Team)" />
        <GridColumn Field="@nameof(Employee.Salary)" />
        <GridColumn Field="@nameof(Employee.OnVacation)" />
                    <GridCommandColumn>
                <GridCommandButton Command="Save" Icon="@SvgIcon.Save" ShowInEdit="true">Update</GridCommandButton>
                <GridCommandButton Command="Edit" Icon="@SvgIcon.Pencil">Edit</GridCommandButton>
                <GridCommandButton Command="Cancel" Icon="@SvgIcon.Cancel" ShowInEdit="true">Cancel</GridCommandButton>
            </GridCommandColumn>
    </GridColumns>
</TelerikGrid>

@code {
    private TelerikGrid<Employee>? GridRef { get; set; }

    private List<Employee> GridData { get; set; } = new();

    private bool GridLoadGroupsOnDemand { get; set; }

    private void GridLoadGroupsOnDemandChanged(bool newValue)
    {
        GridLoadGroupsOnDemand = newValue;

        GridRef?.Rebind();
    }

    private void OnGridStateInit(GridStateEventArgs<Employee> args)
    {
        args.GridState.GroupDescriptors = new List<GroupDescriptor>();

        args.GridState.GroupDescriptors.Add(new GroupDescriptor()
        {
            Member = nameof(Employee.Team),
            MemberType = typeof(string)
        });
    }

    protected override void OnInitialized()
    {
        var rnd = new Random();

        for (int i = 1; i <= 20; i++)
        {
            GridData.Add(new Employee()
            {
                Id = i,
                Name = "Name " + i,
                Team = "Team " + (i % 4 + 1),
                Salary = (decimal)rnd.Next(1000, 3000),
                OnVacation = i % 3 == 0
            });
        }
    }

    public class Employee
    {
        public int Id { get; set; }
        public string Name { get; set; } = string.Empty;
        public string Team { get; set; } = string.Empty;
        public decimal Salary { get; set; }
        public bool OnVacation { get; set; }
    }
}

Dimo
Telerik team
 answered on 09 Oct 2024
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?