Telerik Forums
UI for Blazor Forum
1 answer
51 views

Hi there.
Using the Grid component, setting "Navigable" to "true" and having a DropDownList makes the popup of the component not appear after the user has clicked on the input box.

The DropDownList has a button (with an arrow pointing down) on its right side. Clicking on the button makes the popup appear. The popup also appears if the user clicks on the input box of the component, but this last scenario does not happen if the component is inside a Grid which has "Navigable" set to "true". In this state, the button mentioned also makes the popup not appear.

Here is a gif which showcases this behaviour: https://i.gyazo.com/a071f9fba72d08261d438e31b240d606.mp4
This also affects the ComboBox component: https://i.gyazo.com/bcf2f10a6a6c923d825865ecdf0a7f5a.mp4

Here is the REPL link: https://blazorrepl.telerik.com/mnkDOScb41h1aOK602

Dimo
Telerik team
 answered on 07 Sep 2023
1 answer
57 views
I am using telerikcombobox inside telerikgridn as column. I need to show a value from db in the empty combobox on pageload. Can anyone please help me. Thank you
Marin Bratanov
Telerik team
 answered on 30 Jan 2022
1 answer
129 views

Hi,

 

I'm quite new with telerik and I'm facing a probleme.

A use the grid to follow the status of a property. These status is defined by an enum (it could have been a dictonary, anyway)

When I bind my Grid datasource, in there is an int field representing the enum status.

IE: 0=open, 1=Closed,...

So I've bound the enum to the comboox, TextField and ValueField displays the correct data but on load for example, i'm not able to use the @bind-Value to the correct row. even more, on runtime, if I change one combobox, every comboboxes changes their value

 

I don't see the solution

 


<TelerikGrid Data="@WorkingData" 
             Height="auto"
             Pageable="true" 
             Sortable="true" 
             PageSize=30
             Resizable="true" 
             EditMode="GridEditMode.Popup">
    <GridColumns>
        <GridColumn Field="@(nameof(Work.Status))" Title="Status" Editable=true >
            <Template>
                <TelerikComboBox Width="100%" Data="@comboData" TextField="Value" ValueField="Key" @bind-Value="@cbValue" ></TelerikComboBox>
            </Template>
        </GridColumn>
        
        <GridColumn Field="@(nameof(Work.Comment))"  Title="Comment" />
    </GridColumns>
</TelerikGrid>

@code
{
    enum TicketStatus
    {
        Open = 0,
        Close = 1,
        Planned = 2,    
        Canceled = 3
    }
    public class Work
    {
        public int Status { get; set; }
        public string Comment { get; set; }
    }

    private List<Work> WorkingData;
    private Dictionary<int, string> comboData;
    private int cbValue;

    protected override void OnInitialized()
    {
        base.OnInitialized();

        comboData = Enum.GetValues(typeof(TicketStatus)).Cast<Enum>().ToDictionary(t => (int)(object)t, t => t.ToString());

        WorkingData = new List<Work>
        {
            new Work{Status=1,Comment="My First property"},
            new Work{Status=3,Comment="My second property"},
            new Work{Status=2,Comment="My Third property"},
        };

        cbValue = 0;

    }
}

Does anyonce could help me

 

Regards;

Marin Bratanov
Telerik team
 answered on 30 Jan 2022
1 answer
190 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
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?