Telerik Forums
UI for Blazor Forum
0 answers
7 views

When editing a text field on a Blazor Grid in inline edit mode, pressing the backspace key will cause the cell edit to cancel, similar to what the escape key does. To reproduce, enter edit mode and press the backspace key, or keep pressing the backspace key until  the edit cancels.

This is usual behavior since the backspace key is very often used to clear the text before entering new text and it is unexpected when pressing the key causes the edit to suddenly cancel. It there a way to prevent this unwanted behaviour?

Bryan

 
Bryan
Top achievements
Rank 1
 asked on 15 May 2024
0 answers
7 views

Could there be an option to NOT close the filter dropdown when the clear button is pressed?

I just got a request for this, and their thought is they will have a filter set, then want to click clear and then still pick new items to filter before leaving the dropdown.

Also, watching him on a touch device made it also especially painful.

Anthony
Top achievements
Rank 1
 asked on 15 May 2024
9 answers
3.4K+ views

Hi,

Is there any way of binding to a nullable DateTime or is there a recommended approach for handling null/empty values. I think this question could apply to any of the controls that bind to a struct or an in-built type like Int/Decimal.

Thanks,

Nick.

 

Kristjan
Top achievements
Rank 1
Iron
 answered on 15 May 2024
1 answer
8 views

Hi, the grid toolbar is default located on top of the grid, i would like to place it on bottom (without using a separate element).

This feature is described in documetation (https://docs.telerik.com/blazor-ui/knowledge-base/grid-pager-top-toolbar-bottom) as will be implemented in future version of the library.

Is this planned? there is a release date?

 

actually i solved with this css, can it be a good workaround?


.k-grid.bottom-toolbar {
    display: flex;
    flex-direction: column-reverse;
}


<TelerikGrid Class="bottom-toolbar" />


 

Thanks

Hristian Stefanov
Telerik team
 answered on 15 May 2024
1 answer
11 views

I have a donut with 2  ChartSeries.

For the inner circle I have tried to separate the different data items with a empty space. But I have no idea how it works. Could somebody help?

<ChartSeries Type="ChartSeriesType.Donut" Data="@GridDataDonutProjectName"
Field="@nameof(ProjectOverviewVm.Hours)"
CategoryField="@nameof(ProjectOverviewVm.ProjectName)" Gap="0.8" Spacing="0.8" Margin="5" >

Because of the Margin there is some space between the 2 donuts series

But how can I add some empty space at the arrows in this picture. I have tried something with spacing and gap but I'm doing something wrong

 

Tsvetomir
Telerik team
 answered on 15 May 2024
1 answer
16 views

I added a TelerikWizard with five WizardSteps on a page. No child components, all code directly inside the different steps. Navigating back and forward between the steps works fine, all steps/controls keeps their user input data/state.

After a while I had so much content that I wanted refactor some of the steps into components. I made the first component and added it to one of the steps:

<WizardStep ...
<Content>
    <TransferLocationTables @ref="refTransfer" LocationId="@VM.SelectedLocation.Id" />
</Content>
...

Now when I navigate to that specific step the component is always "reset" and I have to rearrange the data loaded from the DB again, which kind of defeats the whole idea with those steps and being able to go back and forth between them.

When I go one step back I can see in the debugger that the component still got all the internal data. As soon as I go forward to that step everything is empty again. Also noticed the components overriden OnParametersSet and OnInitializedAsync methods are called each time I navigate there so clearly the whole component is "reinitialized" and thus loosing the data.

So, is this changed behavior due to that when I had all code in the TelerikWizard everything behaved as a single component and thus all data persisted (didn't really leave it), but when I add child components they will automatically reinitialize everytime their step is rendered?

I guess I could persist the individual child components state by saving it to the DB and load it everytime I enter that step again, but I'm hoping there is a simpler soluton that I've overlooked (I'm fairly new with coding Blazor but coded .NET for a long time).

 

Svetoslav Dimitrov
Telerik team
 answered on 14 May 2024
1 answer
13 views

In Kendo UI for ASP.NET MVC / JQuery the Grid component has the option to show a refresh icon on bottom bar / pager.  

In the blazor version i cannot see it.

Please add a builtin refresh icon on grid as done in other libraries.

Dimo
Telerik team
 answered on 14 May 2024
1 answer
9 views

I have a dozen OData Endpoints that provide all my data access. I am currently using the autogenerated OData Connected Service that uses the Microsoft OData Client to access the endpoints from services in my Blazor ServerSide app. 

The Telerik Blazor components seem to be geared around using Telerik.DataSource & Telerik.DataSource.Extensions to access the OData Endpoints directly.

Is there a best practice or method for accessing OData Endpoints with Telerik components? 

 

Thanks

Dimo
Telerik team
 answered on 14 May 2024
1 answer
15 views

Hi,

     When the page jumps, the appearance position of the Notification component is reset.

Calling code:

await AlertController.ShowSuccessNotification("[Complete Work Task]:Success");
NavigationController.Navigate(new WorkViewParam());

Controller code:

public static class AlertController
{
    private static Notification NotificationReference { get; set; }

    public static async Task ShowSuccessNotification(string message = "Success",int closeAfter = 60000,object icon = null,AnimationType animationType = AnimationType.Fade,NotificationHorizontalPosition horizontalPosition = NotificationHorizontalPosition.Center, NotificationVerticalPosition verticalPosition = NotificationVerticalPosition.Top)
    {
        if (NotificationReference != null)
        {
            NotificationReference.Animation = animationType;
            NotificationReference.HorizontalPosition = horizontalPosition;
            NotificationReference.VerticalPosition = verticalPosition;
            NotificationReference.Text = message;
            NotificationReference.CloseAfter = closeAfter;
            NotificationReference.Icon = icon;
            await NotificationReference.ShowSuccess();
        }
    }

    internal static void SetNotificationReference(Notification notificationReference)
    {
        NotificationReference = notificationReference;
    }


}

Notification Component Code(.razor):

@using Telerik.Blazor
@using Telerik.Blazor.Components

<style>
    .custom-notification-parent {
        position: fixed;
        left: 50%;
        top: 20px;
        transform: translateX(-50%);
        z-index: 99999999;
    }

    .custom-positioned-notifications {
        position: relative;
        flex-wrap: nowrap !important;
    }

    .k-notification {
        box-shadow: var(--kendo-elevation-4, 0 8px 10px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.12));
        font-size: 16px;
    }
</style>

<div class="custom-notification-parent">
    <TelerikNotification @ref="@notification"
                         AnimationType="@Animation"
                         Class="custom-positioned-notifications"
                         VerticalPosition="@VerticalPosition"
                         HorizontalPosition="@HorizontalPosition">
    </TelerikNotification>
</div>

@code {

}
Notification Component Code(.razor.cs):

publicpartialclassNotification { private TelerikNotification notification { get; set; } public NotificationHorizontalPosition HorizontalPosition { get; set; } = NotificationHorizontalPosition.Center; public NotificationVerticalPosition VerticalPosition { get; set; } = NotificationVerticalPosition.Top; public AnimationType Animation { get; set; } publicstring Text { get; set; } publicint CloseAfter { get; set; } publicobject Icon { get; set; } = null; public async Task ShowSuccess() { notification.Show(new NotificationModel { Text = Text, ThemeColor = ThemeConstants.Notification.ThemeColor.Success, CloseAfter = CloseAfter, Icon = Icon }); }protected override async Task OnInitializedAsync() { awaitbase.OnInitializedAsync(); AlertController.SetNotificationReference(this); } }

Jackson
Top achievements
Rank 1
Iron
 answered on 14 May 2024
0 answers
6 views

When using Mini Mode for the Telerik Drawer, is there a way to make the Telerik Drawer expand/close with the @onmouseenter and @onmouseleave events?

I have the following layout...

<TelerikDrawer Data="@DrawerItems"
			   MiniMode="true"
			   Mode="@DrawerMode.Push"
			   SelectedItemChanged="((DrawerItem item) => SelectedItemChangedHandler(item))"
			   @ref="@DrawerRef"
			   Class="my-drawer">
	<ItemTemplate Context="item">
		<span class="icon-container drawer-tooltip-target" title=@item.Text>
			<TelerikSvgIcon Icon="@item.Icon" Class="drawer-icon" />
		</span>
		<span class="k-item-text">@item.Text</span>
	</ItemTemplate>
	<DrawerContent>
		<div class="content">
			@Body
		</div>
	</DrawerContent>
</TelerikDrawer>

I tried the following...

<TelerikDrawer Data="@DrawerItems"
			   MiniMode="true"
			   Mode="@DrawerMode.Push"
			   SelectedItemChanged="((DrawerItem item) => SelectedItemChangedHandler(item))"
			   @ref="@DrawerRef"
			   Class="my-drawer">
	<ItemTemplate Context="item">
		<div @onmouseenter="() => DrawerRef.ExpandAsync()"
			 @onmouseleave="() => DrawerRef.CollapseAsync()">
			<span class="icon-container drawer-tooltip-target" title=@item.Text>
				<TelerikSvgIcon Icon="@item.Icon" Class="drawer-icon" />
			</span>
			<span class="k-item-text">@item.Text</span>
		</div>
	</ItemTemplate>
	<DrawerContent>
		<div class="content">
			@Body
		</div>
	</DrawerContent>
</TelerikDrawer>

 

But that affects the layout as shown below, and does not appear to fully wrap the Drawer which causes the expand/collapse to be bit twitchy.



It also appears that I'm unable to attach @onmouse events to the <ItemTemplate> tag ( I get an unrecognized attribute error).

Any ideas?

Ryan
Top achievements
Rank 1
 updated question on 13 May 2024
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?