I want to use an auto complete for selecting an item from an object. I'm using the item template and setting the value to a string. When selecting the name, which is 2 properties on the object it puts the id in the text box. How do I get the name to display while still using the id as the selected value?
01.
@page "/test"
02.
03.
<
h3
>Test</
h3
>
04.
<
TelerikAutoComplete
Data
=
"@users"
ValueField
=
"@(nameof(TestUser.Id))"
@
bind-Value
=
"@userId"
>
05.
<
ItemTemplate
Context
=
"user"
>
06.
@user.FirstName @user.LastName
07.
</
ItemTemplate
>
08.
</
TelerikAutoComplete
>
09.
<
button
class
=
"btn btn-primary edit-btn"
@
onclick
=
"@Test"
>Test</
button
>
10.
11.
@code {
12.
13.
private List<
TestUser
> users;
14.
private string userId;
15.
16.
protected override Task OnInitializedAsync()
17.
{
18.
users = new List<
TestUser
>();
19.
users.Add(new TestUser { Id = 1, FirstName = "John", LastName = "Smith" });
20.
users.Add(new TestUser { Id = 2, FirstName = "Jane", LastName = "Doe" });
21.
users.Add(new TestUser { Id = 3, FirstName = "Olivia", LastName = "Williams" });
22.
users.Add(new TestUser { Id = 4, FirstName = "Noah", LastName = "Jones" });
23.
24.
return base.OnInitializedAsync();
25.
}
26.
27.
async Task Test()
28.
{
29.
Console.WriteLine(userId);
30.
}
31.
32.
public class TestUser{
33.
34.
public int Id { get; set; }
35.
public string LastName { get; set; }
36.
public string FirstName { get; set; }
37.
}
38.
}
Hello,
I was wondering if anyone has worked with the Drawer much and has found that if the content takes up more vertical space than the window can handle and the scroll bar appears. When this happens for me and I scroll down, the drawer menu moves as well.
Is there any possible way to make the k-drawer fixed while keeping the k-drawer-content scrollable?
Thank you so very much for your input,
Jesse
Hello!
Have a problem:
I can's set ChartSeriesStyle.Step for ScatterLine chart
Here is sample (taken from your public sample)
<ChartSeries Type="ChartSeriesType.ScatterLine"
Style="ChartSeriesStyle.Step"
Data="@Series1Data"
Name="0.8C"
XField="@nameof(ModelData.X)"
YField="@nameof(ModelData.Y)">
</ChartSeries>
But chart ingore Step style and rendering as normal style
Also, i can't set width for series line.
Trying like:
<ChartSeries Type="ChartSeriesType.ScatterLine"
Style="ChartSeriesStyle.Step"
Data="@Series1Data"
Name="0.8C"
XField="@nameof(ModelData.X)"
YField="@nameof(ModelData.Y)">
<ChartSeriesLine Width="20" />
</ChartSeries>
I am using Editor on Visual studio works fine, but after publish and release to production, the page contains Editor crashed. The application is server side Blazor
developer tools shows:
2020-09-18T20:12:10.617Z] Error: There was an unhandled exception on the current circuit, so this circuit will be terminated. For more details turn on detailed exceptions by setting 'DetailedErrors: true' in 'appSettings.Development.json' or set 'CircuitOptions.DetailedErrors'.
e.log @ blazor.server.js:15
Hi,
I am currently trying to use a dynamic editable in my grid but it doesn't work although I followed the directions in this post: https://docs.telerik.com/blazor-ui/knowledge-base/grid-change-editable-attribute-update-create
<GridColumn Field="@(nameof(Menge))" Title="Menge" Width="100px" Editable="@(Current?.PositionsTyp != PositionsTyp.Hierarchiestufe)">
<EditorTemplate>
@{
Current = context as Item;
<div>@Current.Menge</div>
}
</EditorTemplate>
</GridColumn>
Should it work for InCell editing and virtual scrolling mode too?
Thanks in advance!
I am trying to use your example here: Forum Post
I am rendering a dynamic list of Tabs but can't seem to programmatically select another Tab with the ActiveTabIndexChanged. The code in your example needs to be updated. Can you update us on doing this with both a dynamic Tab list + an ActiveTabIndex set ? Thank you.
I am coming from the Kendo Editor and in that editor I had the ability to paste an image into the editor and it would add it to markup as a base64 string.
It does not appear that the Blazor editor is allowing this as nothing happens when I try to paste an image into it.
I don't want to use the "insert image" button in the editor as I don't want the user to have to save the image somewhere and "link it".
We want our users to be able to take a screen shot of something and just paste it into the editor.
Is there any way this can be accomplished?
Hello, I know the documentation says that grid templates will be ignored on Excel export but I'm wondering if there's any way around that. I have columns that are integers which represent strings (like from a type table on the database) so I have templates set up on those columns to display the strings represented by the integers but of course when I export to Excel it exports the integers which are meaningless to an end user. Maybe there's a way to get access to the context in the Field property or something? Otherwise I'll have to modify my classes to include the strings as well which isn't the end of the world but figured I'd check with you first.
Thanks.
Hi, I've been using the Kendo Scheduler for Blazor and have been following the examples from this doc: https://docs.telerik.com/blazor-ui/components/scheduler/resources#one-resource
However, the only examples for adding addition SchedulerResources are dropdownlists. Is there any way to add a Resource that's a textbox or any other input type? If I leave the Data attribute blank, an error is thrown.
Thanks