Dropdownlist will not dropdown

4 posts, 0 answers
  1. Robert
    Robert avatar
    2 posts
    Member since:
    Oct 2014

    Posted 04 Oct 2019 Link to this post

     I have tried to implement the dropdownlist and the data is being populated to the control, but the control will not dropdown when selected on.

    I have tried to changed from Server/Prerender and also tried a static list. I also have the same issues with Telerik menus. What do I have configured wrong.

    Running Blazor UI 2.1.1

    <TelerikDropDownList Data="@DropDownListData" @bind-Value=@SelectedValue ValueField="ID" TextField="Organization">

    </TelerikDropDownList>

    <br />Selected product: @SelectedValue



    @code {

        public IEnumerable<OrgModel> DropDownListData { get; set; }

        public int SelectedValue { get; set; } = 3;

        WeatherForecast[] forecasts;
        OrgModel[] Orgs;

        protected override async Task OnInitializedAsync()
        {
            forecasts = await ForecastService.GetForecastAsync(DateTime.Now);
            DropDownListData = await OrgService.Get_OrgList_Async();
        }

        //protected async Task OnAfterRenderAsync()
        //{
        //    forecasts = await ForecastService.GetForecastAsync(DateTime.Now);
        //    DropDownListData = await OrgService.Get_OrgList_Async();
        //}

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    5072 posts

    Posted 06 Oct 2019 Link to this post

    Hello Robert,

    There is nothing obviously wrong in this snippet and my best guess is that one of the following issues is manifesting in the project:

    Both will cause errors in the console, so you can monitor it to see the details.

     

    Regards,
    Marin Bratanov
    Progress Telerik

     UI for Blazor
  3. Robert
    Robert avatar
    2 posts
    Member since:
    Oct 2014

    Posted 07 Oct 2019 in reply to Marin Bratanov Link to this post

    Thank you for the help and pointing me the in the right direction. I was fetching the incorrect JS interop file. 
  4. BitShift
    BitShift avatar
    139 posts
    Member since:
    Aug 2014

    Posted 30 Oct 2019 Link to this post

    Glad I found this thread, I was running into the same issue.
Back to Top