Telerik Forums
UI for Blazor Forum
1 answer
285 views

I have created a Grid to display a list of rows from a database. I want to have two columns more than the table gives me - one for a text box and one for a submit button. I need the button's OnClick method to be able to access the entire row. Here's what I've got (simplified) and the final text column is not editable:

@page "/pathto/page"
@using Solution.Shared.Models;
@inject HttpClient Http

<TelerikLoader Visible="@(Results == null)" Size="@ThemeConstants.Loader.Size.Medium" />
@if (Results is not null)
{
	<TelerikGrid Data="@Results"
		TItem="@Result"
		@ref="@Grid"
		EditMode="@GridEditMode.Inline"
		OnCreate="@Submit"
		Class="auto-table"
		Resizable="true"
		Sortable="true"
		Pageable="true"
		PageSize="15"
		Height="auto"
	>
		<GridToolBar>
			<GridCommandButton Command="ExcelExport" Icon="file-excel">Export to Excel</GridCommandButton>
		</GridToolBar>
		<GridColumns>
			<GridColumn Field="@nameof(Result.Username)" Width="8%" Editable="false" Groupable="true">
				<Template>
					@{
						string? username = (context as Result)?.username;
						<LinkToAnotherPage Username="@username" Link />
					}
				</Template>
			</GridColumn>
			<GridColumn Field="@nameof(Result.display_name)" Title="Name" Width="8%" Editable="false" />
			<GridColumn Field="@nameof(Result.Date)" Title="Date" Width="4%" Editable="false" DisplayFormat="{0:MM/dd/yyyy}" />
			<GridColumn Field="@nameof(Result.EditableColumn)" Title="Save This Value" Editable="true" Width="18%" />
			<GridCommandColumn Title="Approve" Width="3%">
				<GridCommandButton Command="Add" Icon="checkmark" ShowInEdit="true" />
			</GridCommandColumn>
		</GridColumns>
	</TelerikGrid>
}

@code {
	List<Result>? Results;
	private TelerikGrid<Result>? Grid;

	protected override async Task OnInitializedAsync()
	{
		Results = await Http.GetFromJsonAsync<List<Result>>("Controller/Action");
	}
	private async Task Submit(GridCommandEventArgs args)
	{
		var ex = args.Value; // this should be the edited column
		Result res = (Result)args.Item;
		// do stuff with res and ex variables
	}
}

Can I bind to the value of the editable column's content when the row is clicked? 

Is there a better way to do this?

Yanislav
Telerik team
 answered on 06 Jan 2023
1 answer
262 views
Is there a way to set the initial focus to an item on a TelerikForm?
Svetoslav Dimitrov
Telerik team
 answered on 06 Jan 2023
1 answer
633 views

I track changes inside my Objects to enable/disable for example Save or Cancel Buttons in the very moment the user hits a key.

Inside my Object I have a Dictionary that list all Properties that have changed during time.

I would like to change the Border/Background/Whatever of each Textbox that have changed. I would like to avoid having a Class for each Textbox and I am looking for a kind of generic approach. I am missing an Event like "OnCellRenderHandler" of the Grid-Control. 

What would be the best solution ? The solution should cover Comboboxes, too...

I would be very pleased to get an answer, maybe it is simple but I am still a novice in Terms of Blazor...

 

Dimo
Telerik team
 answered on 04 Jan 2023
1 answer
120 views

How would I go about adding a tool tip on hover to items on a Telerik Menu using Telerik UI for Blazor?

 

Thanks.

Hristian Stefanov
Telerik team
 answered on 04 Jan 2023
2 answers
378 views

Hello. 

Just a simple question: How to hide the placeholder when the datepicker is disabled or not editable.  

As an example, I don't want to show the placeholder of the "Last response" field when the input is disabled.  

Regards.
Twain.

Twain
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 03 Jan 2023
1 answer
462 views

Hi

I wonder if it is possible to add a kind of footer to the drawer.

For example, whe could have the navigation buttons on the top (like usual)  and some buttons on the bottom ( ex : admin and user profile ) 

here is an example 

 

How can i archieve this ?

 

Thanks

Twain
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 03 Jan 2023
0 answers
87 views
Hello!
Can't find property to change label format for value axis.
Is only the currency format supported?
Please do not limit the use of this component due to such an annoying limitation.
Ivan
Top achievements
Rank 3
Iron
Iron
Iron
 asked on 02 Jan 2023
1 answer
100 views
Hello!
Let's look at simpe line chart


Next look at stock line chart


How to make left and right chart area paddings to first and end points?
Current view is very bad...
Stamo Gochev
Telerik team
 answered on 02 Jan 2023
1 answer
107 views
I am performing an upgrade from 2.29 to 3.7.  I'm working through some breaking changes listed here regarding grids.  During this process, I noticed that we're only a few weeks away from the 4.0 release.  

Do we know yet what breaking changes might be part of this release and when that info will be posted?  
Stamo Gochev
Telerik team
 answered on 02 Jan 2023
0 answers
99 views

Hello!
It is possible to change appearance settings for line' markers?
Need to change at least the size and thickness of the border.
The current settings look bad with a sufficiently large amount of data (1-100)
Especially since it is planned to connect several data series - everything will merge into a heap.
And in second - it would be great to implement an event to change the width of the navigator span.

In the current view, redrawing the chart resets the From - To values to the original ones, which is inconvenient.

Ivan
Top achievements
Rank 3
Iron
Iron
Iron
 asked on 30 Dec 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?