Telerik Forums
UI for Blazor Forum
1 answer
675 views

For mobile view in column item i want to add the a three dot menu.
On click of that button there will be a popup with two buttons (Like image)
I tried a number of things but not able to figure out which component will be helpful in this condition.

Any help will be appreciated 

(Kendo Blazor) 

 

Nansi
Telerik team
 answered on 03 Jan 2024
1 answer
548 views

I need a country code selector prepended with mobile number  in kendo Blazor
But not find any component that can be used.

Any help on this will be appreciated .


Svetoslav Dimitrov
Telerik team
 answered on 03 Jan 2024
1 answer
278 views
Hi, I'm trying to implement global error handling in my blazor application using Telerik ErrorBoundary. Implementation is very simple in the MainLayout.razor I have this code
<ErrorBoundary @ref="errorBoundary">
						<ChildContent>
							@Body
						</ChildContent>
						<ErrorContent Context="ex">
							@{
								OpenNotification("Unhandled exception ocurred. Please try again later.", ThemeColor.Error, CloseAfter.Success);
								// TODO: this code is called twice!

							}
						</ErrorContent>
					</ErrorBoundary>	

Open Notification it's a private method to show error message


private void OpenNotification(string text, string theme, int closeAfter)
	{
		Notification.Instance.Show(new NotificationModel
			{
				Text = text,
				ThemeColor = theme,
				CloseAfter = closeAfter
			});
	}

so when error happens notification is shown 2 times, I set console log in this code and it's logging two times execution.

Any idea what could be the problem?

Thanks

 

Svetoslav Dimitrov
Telerik team
 answered on 02 Jan 2024
1 answer
96 views

Any chance of having the CheckParents functionality of the TreeView component in the TreeList component?

KR

Dimo
Telerik team
 updated answer on 02 Jan 2024
1 answer
194 views

I have tried the following code on the official page of the Telerik pager

<TelerikPager Total="@Games.Count"
              ButtonCount="5"
              PageSize=@PageSize
              Page=@Page
              PageSizes="@PageSizesList">

</TelerikPager>

@{

    // take and render the relevant data portion based on the pager info
    var pageData = Games.Skip((Page - 1) * PageSize).Take(PageSize).ToList();
    @foreach (Game game in pageData)
    {
        <div style="display: inline-block;border: solid;padding: 10px;margin: 10px">
            @game.GameName
        </div>
    }
}
@code {
    public List<int?> PageSizesList { get; set; } = new() { 10, 20, 30 };
    public int PageSize { get; set; } = 20;
    public int Page { get; set; } = 1;
    public List<Game> Games { get; set; }
    protected override void OnInitialized()
    {
        Games = new List<Game>();
        for (int i = 1; i <= 20; i++)
        {
            Games.Add(new Game()
                {
                    GameId = i,
                    GameName = $"Game {i}"
                });
        }
    }
    public class Game
    {
        public int GameId { get; set; }
        public string GameName { get; set; }
    }

}

The output is as follows:

 

Image 1. Output

Image 2: Items per page show all options

I've configured a PageSize of 20 with PageSizes as {5, 6, 7, 8, 9, 10, 20}, and intentionally excluded null to avoid an "All"

option in the items-per-page dropdown.

However, when the PageSize matches the total count of data (20 in this instance), the dropdown doesn't automatically

select the matching option (20).

In the second image, all dropdown options are visible, but the appropriate option (20) isn't auto-selected.

What is the solution to this issue?

Radko
Telerik team
 answered on 01 Jan 2024
1 answer
165 views

Is it possible to have TelerikGrid for Blazor configured so when grid is using inline edit, as user tabs to next cell an event is triggered so that manual updates can be done to the row data, as simplest example, cells are quantity, unitcost, gst, total so that as unitcost is changed / exited  the gst is calculated as quantity*unitcost*0.10 and total is calculated as quantity*unitcost+gst

I've been searching for  hours and I'm starting to arrive at conclusion it is not easily done.

Cheers

Steve Wark

Radko
Telerik team
 answered on 01 Jan 2024
1 answer
378 views

I have a combobox component that can draw on available properties such as "Class" and "MaxHeight." However, when I try to implement comboboxes, I see no way to disable them. Below is a portion of the RenderComboBox method. I can only avoid the error by commenting out "d.AddAttribute(302, "Enabled", "false");"

                RenderFragment item = d =>
                {
                    d.OpenComponent<ComboBoxPopupSettings>(20);
                    if (RowCount == 0) { RowCount= 20; }
                        d.AddAttribute(300, "MaxHeight", $"{(RowCount * 22).ToString()}px");
                        d.AddAttribute(301, "Class", "telCombo");
                        d.AddAttribute(302, "Enabled", "false");
                        d.CloseComponent();
                };

The above code earns me the message

"Object of type 'Telerik.Blazor.Components.ComboBoxPopupSettings' does not have a property matching the name 'Enabled'."

Indeed, when I look it up, the list of inherited members has nothing for enabling/ disabling the feature. How can i disable it?

Radko
Telerik team
 answered on 01 Jan 2024
1 answer
817 views

Adding FormItem inside the FormItems got System.ArgumentNullException: Value cannot be null. (Parameter 'For') when rendering

This is my code of course the Model and EditContext will be different.

 

<TelerikForm Model="FarsDetailSate.Model"@
ref="FormReference"
EditContext="FarsDetailSate.EditContext"
Size="@ThemeConstants.Form.Size.Medium"
Columns="1"ColumnSpacing="40px"
Orientation="FormOrientation.Vertical"
Class="mb-3 px-3">

<FormValidation>
<FluentValidationValidatorValidator="@Validator">
</FluentValidationValidator>
<TelerikValidationSummary/>
</FormValidation>

<FormItems>
<FormItem Field="@nameof(Vehicle.MotorCarrierIdentificationNumber)" 
LabelText="Carrier: " 
Enabled="FarsDetailSate.HasEditPermission" Class="col-sm-12 col-md-6 col-lg-4">
</FormItem>
</FormItems>

<FormButtons></FormButtons>
</TelerikForm>
Radko
Telerik team
 answered on 01 Jan 2024
1 answer
499 views

Hi,

 

I have a TelerikForm containing a Fluent Validator and 2 buttons.
Only one of them has to validate the form.

However, even if I set NO  code into the button's associated method, it does trigger the validation.

Seems to be a default behaviour.

How to disable it for my second button?

 

Thx in advance

 

A

Radko
Telerik team
 answered on 25 Dec 2023
1 answer
224 views

Hi there!

I have created a component (Component) that is a TileLayoutItem. It renders fine for the first time but it doesn't re-render after its properties changes (OnClickHandler).

Am I doing something wrong? The exact same code works if added directly on Main.

Running example: https://blazorrepl.telerik.com/mnbQmvlX24maslQE52

Component

<TileLayoutItem>
    <HeaderTemplate>
        <a href="#">Component<span class="k-icon k-i-caret-alt-right widget-title-icon"></span></a>
    </HeaderTemplate>
    <Content>
        @test
        <TelerikButton OnClick="@OnClickHandler">Click me!</TelerikButton>        
    </Content>
</TileLayoutItem>
@code {
    private string test = "Button was not clicked yet";
    private void OnClickHandler(MouseEventArgs args)
    {
        test = "Button was clicked at: " + DateTime.Now.ToString();            
    }
}

Main

<TelerikTileLayout Columns="1">
    <TileLayoutItems>
        <Component></Component>
        <Component></Component>
        <TileLayoutItem>
            <HeaderTemplate>
                <a href="#">TileLayoutItem<span class="k-icon k-i-caret-alt-right widget-title-icon"></span></a>
            </HeaderTemplate>
            <Content>
                @test
                <TelerikButton OnClick="@OnClickHandler">Click me!</TelerikButton>        
            </Content>
        </TileLayoutItem>
    </TileLayoutItems>
</TelerikTileLayout>
@code {
    private string test = "Button was not clicked yet";

    private void OnClickHandler(MouseEventArgs args)
    {
        test = "Button was clicked at: " + DateTime.Now.ToString();            
    }
}

Radko
Telerik team
 answered on 25 Dec 2023
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?