Telerik Forums
UI for Blazor Forum
1 answer
153 views

Hi,

Is it possible to specify different editor templates for different levels in hierarchical data?

What I am trying to do is to build a hierarchical structure for grouping items. The list of items is specified so, in the grouping hierarchy, I want to select an item as the child element of the lowest grouping level rather than typing the name of the item and resolving if it exists. I thus want for the lowest level, to have a combobox rather than an editbox. The data items presented in the treelist have a property to bind to.

Thanks for any suggestions.

Renier Pretorius

Marin Bratanov
Telerik team
 answered on 30 Apr 2021
1 answer
238 views

Hi,

Is there a tooltip option to add for the expend plus button on the left of a telerik grid row. Several of my clients have wondered if I could do this? Is there a function already in the Telerik Blazor Grid component? If not, are there any examples of someone attempting this on github? My clients have employees which they believe this option/concept would be very helpful.

Marin Bratanov
Telerik team
 answered on 30 Apr 2021
2 answers
761 views
I'm noticing that the window will shift down when I click on the window title (e.g. when I want to move the window).  It only happens if I have scrolled my main page up.  As a matter of fact, the window will shift down exactly the same distance that I've scrolled my main page.  The shifting will occur repeatedly as well.  Each time I click on the window title, it shifts down until it's completely disappeared.  At that point I'm stuck because I can't close the window.  Looks like the calculation that is computing the top coordinate of the window isn't correctly accommodating the scroll position of the main page.
Marin Bratanov
Telerik team
 answered on 30 Apr 2021
1 answer
3.7K+ views
Are there any plans to support the equivalent of ASP.Net Core Grid Detail Template in UI for Blazor?
Detail template in ASP.NET Core Grid Component Demo | Telerik UI for ASP.NET Core
Marin Bratanov
Telerik team
 answered on 30 Apr 2021
1 answer
295 views

Hello,

I want to use a combobox in a telerik grid,  I'm succesfully able to bind and display the data in the combobox as well. 

however when I select a value from the combobox and press the update button,  I get out of the edit mode and the combobox 

value goes back to null. (placeholder)

 

here is a simplified version of my models


  public class PageControlsM
    {

        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        public string ControlCode { get; set; }

        [ForeignKey("ControlCode")]
        public  ControlTypes ControlTypes { get; set; }

    }

 

public class ControlTypes
    {
        [Key]
        public string Code { get; set; }
        
        public string ControlName { get; set; }

        public string HtmlCode { get; set; }
    }

 

and this is my grid implementation:


 <TelerikGrid Data="@PageControlList"
                  Height="auto"
                  Pageable="true"
                  Sortable="true"
                  Reorderable="true"
                  Resizable="true"
                  PageSize="5"
                  EditMode="GridEditMode.Popup">
            <GridToolBar>
                <GridCommandButton Command="Add" Icon="add">Yeni Kontrol Ekle</GridCommandButton>
            </GridToolBar>
            <GridColumns>

                <GridColumn Field=@nameof(PageControlsM.ControlCode) Width="100%" Title="Kontrol Turu">
                    <EditorTemplate Context="controlMContext">
                        @{
                                if (controlMContext is PageControlsM controlM)
                                {
                                <TelerikComboBox Data="@ControlTypesList"
                                                 TextField="ControlName"
                                                 ValueField="Code"
                                                 Width="90%"                                                
                                                 @bind-Value="controlM.ControlCode"
                                                 Placeholder="<Seciniz>"
                                                 ClearButton="true"
                                                 Filterable="false">
                                </TelerikComboBox>
                                }
                        }
                    </EditorTemplate>

                </GridColumn>

                <GridCommandColumn Width="100%">

                    <GridCommandButton Command="Edit" Icon="edit">Edit</GridCommandButton>
                    <GridCommandButton Command="Delete" Icon="delete">Delete</GridCommandButton>
                    <GridCommandButton Command="Update" Icon="update" ShowInEdit="true">Update</GridCommandButton>

                    <GridCommandButton Command="Save" Icon="cancel" ShowInEdit="true">Save</GridCommandButton>
                    <GridCommandButton Command="Cancel" Icon="cancel" ShowInEdit="true">Cancel</GridCommandButton>
                </GridCommandColumn>

            </GridColumns>

        </TelerikGrid>

 

 

Marin Bratanov
Telerik team
 answered on 30 Apr 2021
1 answer
2.7K+ views

Hello,

I am using a NumericTextBox in a form to input a decimal number.
The only decimal-separating character is " , ". I would like to be able to also use ' . ' as it's commonly used and easier to access on the keyboard while using the numeric pad.

The component doesn't seem to allow me to set which separator is used. The only information I have found is that it's fully dependant on the app's culture. Our culture is set to French (France), which uses ' , ' as a separator, so it's the only symbol the component will allow.

Is there any way to allow multiple decimal separators without changing the entire app's culture? (Even in this case I don't know if that would enable me to use both commas and dots)

Thank you,

Johnny

Marin Bratanov
Telerik team
 answered on 30 Apr 2021
1 answer
1.5K+ views
The combo box data binding documentation discusses the ability to bind to a model, however in the example the bind-Value is set to an integer property. If I set the bind-Value to a property that is an object type I get an invalid cast exception. Is there a way to bind such that the selected value is an object instead of a primitive type? I know I can use a primitive type as the selected value and then fetch the object out of the list in my view model but it would be cleaner to bind directly to the object itself.
Hristian Stefanov
Telerik team
 answered on 29 Apr 2021
3 answers
3.2K+ views

I'm would like to have the buttons on my form justified right.  I tried various Bootstrap alignment styles, which have no effect.  How can I justify the buttons to the right?

Also, maybe the FormButtons component should support various justification: left, center, right, vertical.

Thanks

 

Svetoslav Dimitrov
Telerik team
 answered on 29 Apr 2021
1 answer
1.4K+ views

Hi,

I have burned some time trying to understand why ComboBox is not selecting predefined value. If myComboData is null/empty initially and loaded from remote API then predefined value is not selected.

Workaround 1: Set _selectedValue to -1 and then back to 2 to trigger selection.

Workaround 2: Wrap combo with if(myComboData != null).

Both seem dirty to me.

In samples (https://demos.telerik.com/blazor-ui/combobox/overview) we don't have a null checks.

<TelerikComboBox @bind-Value=_selectedValue Data="@myComboData" TextField="MyTextField" ValueField="MyValueField" TValue="int" TItem="MyDdlModel">
</TelerikComboBox>

@code {
	int _selectedValue { get; set; } = 2; // Preselected value
	IEnumerable<MyDdlModel> myComboData { get; set; } = Enumerable.Empty<MyDdlModel>();

	protected override async Task OnInitializedAsync()
	{
		myComboData = await LoadData();
		await base.OnInitializedAsync();
	}

	private async Task<IEnumerable<MyDdlModel>> LoadData()
	{
		await Task.Delay(1);
		return Enumerable.Range(1, 20).Select(x => new MyDdlModel { MyTextField = "item " + x, MyValueField = x });
	}

	public class MyDdlModel
	{
		public int MyValueField { get; set; }
		public string MyTextField { get; set; }
	}
}


Marin Bratanov
Telerik team
 answered on 29 Apr 2021
2 answers
460 views

In a grid with FilterMode = GridFilterMode.FilterRow the step size for the up/down controls of a numeric field is 1. How can I change this to 0.1 (like Step="0.1" in TelerikNumericTextBox)? Everything else (resetting filter, selecting filter operator,...) should work as in the standard implementation.

Klaus
Top achievements
Rank 1
Iron
 updated answer on 28 Apr 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?