Telerik Forums
UI for Blazor Forum
2 answers
822 views

Hi,

When I hit the add button on a grid, I notice that the focus does not go to the first cell of the newly added row for editing. 

This is kind of annoying. How can I force this?

Thanks … Ed

     <TelerikGrid Data=@GridData
                         Pageable="true" Groupable="true" Sortable="true"
                         OnUpdate="@UpdateHandler" OnCreate="@CreateHandler" OnEdit="@EditHandler">
                <GridColumns>
                    <GridColumn Field="Name" />
                    <GridColumn Field="IsActive" Title="Is Active">
                    
                    </GridColumn>
                    <GridCommandColumn Width="300px">
                        <GridCommandButton Command="Save" Icon="save" ShowInEdit="true">Update</GridCommandButton>
                        <GridCommandButton Command="Edit" Icon="edit">Edit</GridCommandButton>
                        <GridCommandButton Command="Cancel" Icon="cancel" ShowInEdit="true">Cancel</GridCommandButton>
                    </GridCommandColumn>
                </GridColumns>
                <GridToolBar>
                    <GridCommandButton Command="Add" Icon="add">Create Role</GridCommandButton>
                </GridToolBar>
            </TelerikGrid>

Randy Hompesch
Top achievements
Rank 1
 answered on 17 Oct 2019
3 answers
293 views
hi, i was wondering to know if there is a way to give custom style to each telerik component individually i have already tried using class and id but some of components do not accept class or id i also  tried this https://themebuilder.telerik.com/blazor-ui but unfortunately  there is a very big problem with colors and sometimes they don't match and will result in an awkward component which most parts has same color 
Marin Bratanov
Telerik team
 answered on 17 Oct 2019
3 answers
174 views

Anxious to get started with Blazor components, especially the grid. I was browsing the various demos and noticed some didnt seem to respond in Firefox.  Opened them in Chorme and they worked.

The grid however works fine in Firefox 69.0.2 (64-bit), Windows 10

examples:
(1) Menu. Items wont drop down
https://demos.telerik.com/blazor-ui/menu/overview

(2) Dropdown list.  Items wont drop down
https://demos.telerik.com/blazor-ui/dropdownlist/overview

There may be others, but both of the above worked ok in Chrome

Marin Bratanov
Telerik team
 answered on 17 Oct 2019
2 answers
1.1K+ views

Have a need that might be able to handle it with a Treeview.  Need to allow a user to edit a few nodes of a json file, then save the changes.

treeview demo

Found this javascript-based example of editing json in the browser.  Probably more features than I need.
https://github.com/josdejong/jsoneditor

If nothing else, I think with the Blazor Treeview as-is, could I use the following approach?

- Load json data into the tree structure
- Place a single input field somewhere near the tree (eg. at the top)
- Use a template of some sort that includes an "onclick" event
- The onclick event loads the item text or value into the input field for editing
- Provide a "save changes" button that takes current values of the data in the tree, serializes back to json and saves over the top of the file.

Sound reasonable?

Marin Bratanov
Telerik team
 answered on 17 Oct 2019
8 answers
314 views

Hi,

We use the Kendo Calendar for a page on an internal site that i'm trying to update with Blazor.

The Kendo Calendar highlights multiple date that someone has booked, they can double-click to add/remove dates.

I don't seem to be able to accomplish this with the Blazor Calendar, I can pre-load existing dates fine, but if I select a new date the pre-loaded dates vanish. Do I need to reload dates on each click?

Also, will we get a double-click handler in the future?

<TelerikCalendar Date="@startDate"
                 Min="@min"
                 View="CalendarView.Month"
                 SelectionMode="@CalendarSelectionMode.Multiple"
                 SelectedDates="@selectedDates"
                 ValueChanged="@CalendarChangeHandler"
                 @ref="calendar">
</TelerikCalendar>
@code {
    DateTime startDate = DateTime.Today;
    DateTime min = DateTime.Today.AddDays(1);
    private List<DateTime> selectedDates { get; set; }
 
    private Telerik.Blazor.Components.TelerikCalendar calendar;
 
    protected override async Task OnInitializedAsync()
    {
        selectedDates = _timeOffFactory.GetDates();
    }
 
    private void CalendarChangeHandler(DateTime newDate)
    {
        selectedDates.Add(newDate);
    }
}
David Rhodes
Top achievements
Rank 1
 answered on 16 Oct 2019
6 answers
684 views

There are various "blocking ui" solutions and examples on the inter-web that allow you to block part or all of the UI while some longer-than-normal process takes place.  Eg.  a user clicks a button that has to load and process some data.

One example done with Angular is this
https://embed.plnkr.co/plunk/bNfRvD

How can we implement something similar with Blazor AND not resort to javascript interop?

Marin Bratanov
Telerik team
 answered on 14 Oct 2019
1 answer
1.2K+ views

Hi,

How do I add css to Telerik blazor widget markup?

Specifically, I am  interested in changing the back and fore color of the treeview.

Thanks … Ed

 

Marin Bratanov
Telerik team
 answered on 14 Oct 2019
1 answer
343 views

Good morning, we have acquired the Telerik package for Blazor and we have the following problem:
We have a project that uses Telerik + Inspinia, and by adding the script “<script src =" _ framework / blazor.server.js "> </script>”, inspinia stops working. Does not expand the side menu.

When removing the script, the side menu works but telerik does not:

By replacing the following in inspinia.js the side menu and telerik work:

But the submenu does not work, when you click it does not display the submenu:

Apparently Telerik Blazor is not compatible with Inspinia

Project attached.

Regards.

 

Marin Bratanov
Telerik team
 answered on 13 Oct 2019
3 answers
498 views

I have a date category x-axis which is currently auto fitting.
It is somewhat redundant however I was trying to add a title to the axis and I ran into issues.
Is that supported? I can easily add titles to a value axis.

Without the line "ChartCategoryAxisTitle" it works correctly however with no title.

Code:

<ChartCategoryAxes>
    <ChartCategoryAxis BaseUnit="ChartCategoryAxisBaseUnit.Fit" Type="ChartCategoryAxisType.Date" MaxDateGroups="10" />
    <ChartCategoryAxisTitle Text="Time" />
</ChartCategoryAxes>

 

Error:

blazor.server.js:15 [2019-10-10T18:39:17.853Z] Error: System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Blazor.Components.ChartCategoryAxisTitleBase.AddSelfToParent()
   at Telerik.Generated.Blazor.Components.ChildComponent.OnInitialized()
   at Telerik.Blazor.Components.ChartCategoryAxisTitleBase.OnInitialized()
   at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
Marin Bratanov
Telerik team
 answered on 13 Oct 2019
6 answers
2.5K+ views

When the TelerikButton component's fully qualified name isn't used I get an error. Examples of working and non-working code below:

This works:

@page "/teleriktest"

@using Telerik.Blazor.Components.TextBox

<TelerikTextBox Value="My text value"></TelerikTextBox>

<Telerik.Blazor.Components.Button.TelerikButton>My button</Telerik.Blazor.Components.Button.TelerikButton>

This does not work

@page "/teleriktest"

@using Telerik.Blazor.Components.TextBox

@using Telerik.Blazor.Components.Button

<TelerikTextBox Value="My text value"></TelerikTextBox>

<TelerikButton>My button</TelerikButton>

I get the error: 

Unhandled exception rendering component: Object of type 'TestProject.Pages.TelerikButton' does not have a property matching the name 'ChildContent'.

As you can see, doing something similar with the TelerikTextBox works fine, so I'm thinking it might not be me.

 

Marin Bratanov
Telerik team
 answered on 10 Oct 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?