Telerik Forums
UI for Blazor Forum
1 answer
331 views

Using blazor server with latest Telerik Blazor package (currently 4.1.0).

I created a very simple CustomDropDownList.razor file with the following:

@typeparam TItem
@typeparam TValue
@inherits TelerikDropDownList<TItem, TValue>

and attempted to use the new component in a page:

@page "/test"

<CustomDropDownList Data="testData" @bind-Value="value" />

@code {
    int? value = null;

    private List<Model> testData = new List<Model>()
    {
        new Model() { Id = 1, Text = "Item 1" },
        new Model() { Id = 2, Text = "Item 2" }
    };

    class Model
    {
        public int? Id { get; set; }
        public string Text { get; set; }
    }
}

I get the javascript error:

Cannot read properties of null (reading addEventListener)

I'm aware you have a page regarding this error, but it only suggests making sure telerik-blazor.js file is up to date. Mine is.

Now, if I define the same component in a .cs file instead of a .razor file, the scenario works fine:

public class CustomDropDownList<TItem, TValue> : TelerikDropDownList<TItem, TValue>
{
}

REPL with error (using .razor file): https://blazorrepl.telerik.com/GRaoFuvr00aqKiQq27
REPL that works (using .cs file): https://blazorrepl.telerik.com/wHkyFubg58jPmb8D40

So what is going on here?

Ultimately, I'm trying to inherit from TelerikDropDownList to encapsulate a reusable custom dropdown. I have done this with .cs files a number of times with no problem, but in this case I was wanting to define an ItemTemplate and it's much more practical to do .razor file - that's when I discovered this issue.

Dimo
Telerik team
 answered on 11 Apr 2023
1 answer
177 views

 

Is there a way to do in form editing in Telerik Grid for Blazor(TelerikGrid) like the one shown here for Telerik RadGrid?

https://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/edit-form-types/defaultcs.aspx
swathi
Top achievements
Rank 1
Iron
 answered on 11 Apr 2023
0 answers
139 views
We are working accessibility feedback for our site and one of the items we are asked to look at is the reading order.   The reader reads our row of labels and then the row of textboxes. (see screenshot)  Outside of redoing how we made the page is it possible to indicate the order?  I think not, but looking for confirmation before we do anything.
Spencer
Top achievements
Rank 1
 asked on 10 Apr 2023
1 answer
467 views
Hi All,

I'm looking to iterate over a list in my data model to dynamically create columns in a TelerikGrid. Is this functionality possible at the moment?

Ideally i wanted to do something like this:
<TelerikGrid Data="@GridRowItems">
	<GridColumns>
		<GridColumn Field="@nameof(GridRowItem.Name)"></GridColumn>
		@{
			var gridRowItem = context as GridRowItem;
			foreach (var childField in gridRowItem.ChildFields)
			{
				<GridColumn Title="@childField.Name">
					<Columns>
						<GridColumn Field="@nameof(childField.Value1)"></GridColumn>
						<GridColumn Field="@nameof(childField.Value2)"></GridColumn>
					</Columns>
				</GridColumn>
			}
		}
	</GridColumns>
</TelerikGrid>

class GridRowItem{
	string Name;
	List<ChildField> ChildFields;
}

class ChildField{
	string Name;
	double Value1;
	double Value2;
}
I can guarantee that every GridRowItem has the same number of ChildFields, but that number is variable

Thanks 
Ivan
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 07 Apr 2023
1 answer
655 views

The background of the predefined dialog box appears transparent.

Dimo
Telerik team
 answered on 07 Apr 2023
0 answers
123 views

Hi,

Like Subject above, when I Debug code, my scrollbar change to default browser scrollbar (Image Scrollbar1.jpg)

When i press F12 to go to Developer mode, it changes to normal - Telerik scrollbars. Its shadow and it is hard to look little bit (Image Scrollbar2.jpg).

I dont know why its happen.  And it happended a couple days ago.

Browsers that I used to check: Edge, Firefox and Chrome and had same issue.

Thank you for your help.

 

ACV IT
Top achievements
Rank 1
 asked on 06 Apr 2023
1 answer
239 views

I have a grid using paging and sorting features. When a user edit a record (I am using an edit form that show an edit form) and he changed the value from the sorted column, the item is no more visible in the current page since it moved in another page according to the sorting feature.

My question how can I find in which page my item is now on, and to programmatically select that page so my item will stay in the current view after edition.

Thanks

Dimo
Telerik team
 updated answer on 06 Apr 2023
1 answer
142 views

I'm currently working on a multiview calendar. However, I've come across an issue that confuses the user quite a bit. If I allow a selection that goes beyond the boundaries of a single month, then the overflow from the next or previous month is also selected and displayed. This results in the question:

"Is it possible to disable the display of overflow from the next or previous month?" In the template, I don't have any information in the context about which month the multiview is displaying, otherwise it would be easy to deactivate the context.

The question is, can the calendar be configured to simply not display overflow from other months?



For Display this is not a Problem, I override .k-other-month, so the overhang is not visible. But how to solve this in a Multiview Selection?

Dimo
Telerik team
 answered on 06 Apr 2023
1 answer
337 views

I am using the fluent theme and for some reason the dialogs styles are mushed.  I have not customized them in any way.  Any idea what might be causing the problem?

 

Dimo
Telerik team
 answered on 06 Apr 2023
1 answer
288 views

Hello! I'm trying to implement a custom component that uses a numeric text box internally -- just to factor out some redundant markup in my particular situation. A custom component would be a nice fit. I've tried a few different things, but I can't get binding behavior to work. It shows the right value, but doesn't allow any updating. (All entries show as invalid.)


I tried it with a Value/ValueChanged approach and also a @bind-Value approach, and couldn't get either to work.

I've noticed that my ValueChanged handler (OnValueChanged) is not getting called.

I looked at this: https://docs.telerik.com/blazor-ui/getting-started/value-vs-data-binding but it didn't illuminate anything for me, really.

Any ideas what I'm doing wrong?

Adam
Top achievements
Rank 1
Iron
 answered on 04 Apr 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?