Telerik Forums
UI for Blazor Forum
1 answer
11 views

I would like the Blazor Combobox to open the dropdownlist on clicking the input area when there is a placeholder. Something like OpenListOnClick=true

It will cause the Combobox to behave much like the Blazor DropDownList.  This was the similar functionality of the RadComboBox in the Telerik UI asp.net Ajax controls found here:  https://demos.telerik.com/aspnet-ajax/combobox/examples/overview/defaultcs.aspx

Note: when a value has been selected the text becomes highlighted, but when the placeholder is there it puts the carat/cursor at the beginning.

Or if there is an simple workaround that would be great.

Hristian Stefanov
Telerik team
 answered on 01 Apr 2024
0 answers
15 views

Hello,

i´m evaluating Telerik UI for Blazor.

Maybe you can help me:

it is possible to bind a WebGrid IgbGrid to a Web-DropDown with full Grid-FUncrtionality like sorting, grouping, filtering? Attached you find a sample of the Use-Case.

Volkhard
Top achievements
Rank 1
 asked on 01 Apr 2024
2 answers
29 views

The exception is only raised when applying a filter , sorting up and down works ok. Using "contains" filter.

If I remember correctly, this worked before and I did not change my code AFAIK.

Controller side looks like this:

        [HttpPost]
        [SwaggerResponse(StatusCodes.Status200OK)]
        [SwaggerResponse(StatusCodes.Status404NotFound)]
        [Route(ApiUrlConstants.DataSourceRequestSubUrl)]
        public IActionResult DataSourceRequest(string projectIdentifier, [FromBody] DataSourceRequest request)
        {
            if (!TryGetProject(projectIdentifier, out var project))
                return this.NotFoundResult(nameof(projectIdentifier), projectIdentifier);
            var collection = GetCollection(project).Select(MapItemTypeToDto);
            var resultData = collection.ToDataSourceResult(request);
            return Ok(resultData);
        }


WebUI/Client side OnRead event looks like this (the request is sent to server without any further changes):

        private async Task ReadItems(GridReadEventArgs args)
        {
            var dataSourceResult = CollectionClient?.HasValidPath ?? false
                ? await CollectionClient.DataSourceRequestAsync(args.Request)
                : new();
            args.Data = dataSourceResult?.Data;
            args.Total = dataSourceResult?.Total ?? 0;
        }

which raises an exception in my API server , log looking like this:


fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
      An unhandled exception has occurred while executing the request.
      System.ArgumentException: Provided expression should have string type (Parameter 'stringExpression')
         at Telerik.DataSource.Expressions.ExpressionFactory.LiftStringExpressionToEmpty(Expression stringExpression)
         at Telerik.DataSource.Expressions.FilterOperatorExtensions.GenerateToLowerCall(Expression stringExpression, Boolean liftMemberAccess)
         at Telerik.DataSource.Expressions.FilterOperatorExtensions.GenerateCaseInsensitiveStringMethodCall(MethodInfo methodInfo, Expression left, Expression right, Boolean liftMemberAccess)
         at Telerik.DataSource.Expressions.FilterOperatorExtensions.GenerateContains(Expression left, Expression right, Boolean liftMemberAccess)
         at Telerik.DataSource.Expressions.FilterOperatorExtensions.CreateExpression(FilterOperator filterOperator, Expression left, Expression right, Boolean liftMemberAccess)
         at Telerik.DataSource.Expressions.FilterDescriptorExpressionBuilder.CreateBodyExpression()
         at Telerik.DataSource.FilterDescriptor.CreateFilterExpression(ParameterExpression parameterExpression)
         at Telerik.DataSource.FilterDescriptorBase.CreateFilterExpression(Expression instance)
         at Telerik.DataSource.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpression()
         at Telerik.DataSource.CompositeFilterDescriptor.CreateFilterExpression(ParameterExpression parameterExpression)
         at Telerik.DataSource.FilterDescriptorBase.CreateFilterExpression(Expression instance)
         at Telerik.DataSource.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpression()
         at Telerik.DataSource.Expressions.FilterExpressionBuilder.CreateFilterExpression()
         at Telerik.DataSource.Extensions.QueryableExtensions.Where(IQueryable source, IEnumerable`1 filterDescriptors)
         at Telerik.DataSource.Extensions.QueryableExtensions.CreateDataSourceResult[TModel,TResult](IQueryable queryable, DataSourceRequest request, Func`2 selector)
         at Telerik.DataSource.Extensions.QueryableExtensions.ToDataSourceResult(IQueryable queryable, DataSourceRequest request)
         at Telerik.DataSource.Extensions.QueryableExtensions.ToDataSourceResult(IEnumerable enumerable, DataSourceRequest request)
         at SNG.LccNion.API.Controllers.ProjectSubCollectionBaseController`2.DataSourceRequest(String projectIdentifier, DataSourceRequest request) in S:\Sources\LCCNion\Source\SNG.LccNion.API\Controllers\ProjectSubCollectionBaseController.cs:line 85
         at lambda_method21(Closure, Object, Object[])
         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
      --- End of stack trace from previous location ---
         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
      --- End of stack trace from previous location ---
         at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
      --- End of stack trace from previous location ---
         at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
         at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)
         at SNG.LccNion.API.JWTAuth.JwtMiddleware.Invoke(HttpContext context, IEnumerable`1 authenticationServices) in S:\Sources\LCCNion\Source\SNG.LccNion.API\StartupConfigs\JWTAuth\JWTMiddleware.cs:line 60
         at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
         at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
         at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
         at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
         at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
         at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)

Wich does not really help finding out was the problem is. Sorting on any column works ok. It just seems filtering is broken somehow.

Also tried other filter options: "Equals" (no results, no error, even though it should match something), "StartsWith" same error

Pretty sure I am doing something wrong, - but what? BTW I have the same trouble using a dropdownlistbox with an OnRead handlerevent.

Some version info:

  • Telerik.DataSource v3.0.1
  • Telerik.UI.for.Blazor 5.1.1
  • VS 2022, .NET8

TIA,

Hans

Hans
Top achievements
Rank 2
Iron
Iron
 answered on 19 Mar 2024
1 answer
38 views

I have an issue with the DropDownList and Data Annotations.

I have created a REPL instance that demonstrates the problem https://blazorrepl.telerik.com/GyamPdlf37LXpPAW36

 

Select the last item in the tree 7.Garden and change the value in the drop down list to Unsupported.

The drop down list shows a red border.

Select item 6.Garden from the tree. (Any item in the tree other than 1 will do)

I expect the drop down to not have the red border, yet is does.

 

The text box does not show the same behaviour.

Select 7.Garden

Edit the email address to start with unsupported

The text box has the red border

Select any other item in the tree, they will not have the red border.

 

TBH I'm not sure if this is a Telerik/DropDownList issue or I'm doing something wrong.

The REPL example replicates an issue in a larger piece of code that is more complex with regards to the validation which is why there are no data annotations on properties and the binding are not simple.

 

Regards

 

Nadezhda Tacheva
Telerik team
 answered on 16 Feb 2024
0 answers
60 views

Hello,

I have a grid with InLine editing. The first column in the grid is a dropdownlist. The second column has a switch statement that will show a different control based on the selected value of the dropdown. I have an OnChange() method on the dropdown and I call StateHasChanged() in that method, but the switch statement never gets called. 

How can I get the second column in the grid change based on the first column changing?

Thanks,

Dave

David
Top achievements
Rank 1
 updated question on 10 Jan 2024
1 answer
30 views
We'd like to open the dropdownlist automatically when it receives focus, and then focus on the filter textbox inside the dropdown. Is this possible? Was hoping for an OnFocus event.
Nansi
Telerik team
 answered on 08 Jan 2024
1 answer
78 views

For mobile view in column item i want to add the a three dot menu.
On click of that button there will be a popup with two buttons (Like image)
I tried a number of things but not able to figure out which component will be helpful in this condition.

Any help will be appreciated 

(Kendo Blazor) 

 

Nansi
Telerik team
 answered on 03 Jan 2024
1 answer
71 views

I need a country code selector prepended with mobile number  in kendo Blazor
But not find any component that can be used.

Any help on this will be appreciated .


Svetoslav Dimitrov
Telerik team
 answered on 03 Jan 2024
1 answer
261 views

Is there a plan to fix this in the long term? The "work-around" listed in your documentation, Configure the Render Mode per Page found at https://docs.telerik.com/blazor-ui/getting-started/web-app#configure-the-render-mode-per-page technically functions as the root component error goes away and site starts working... 

However, it misses the bigger issue in that it now loads the entire page including all of the layout code and components, re-executing them as well... put some components in the TelerikLayout and add break points to the OnInit functions to see what I am referring to. It will now do this for every single page in application now...

So... to my initial question... what is the plan to fix/address the TelerikRootComponent in the multiple rendering mode world that is .NET 8 now?

I will say it looks like the Blazor team added a new concept of using builder.Services.AddCascadingValues() to address this problem, I have used it with our internal RootComponent to fix this same concept with our internal code... thoughts?

builder.Services.AddTelerikCascadingParameters(); is referenced at url below:

https://github.com/dotnet/aspnetcore/issues/50724 by SteveSandersonMS, I realize he was just throwing out an idea, the above line of code doesn't actually exist to my knowledge, at least not yet... :)

 

Thanks in advance!

 

Dimo
Telerik team
 answered on 11 Dec 2023
0 answers
39 views

Hello, I have a page where user could click a button to open a modal popup. Then create a name and state association. However, after clicking the button, popup doesn't show up and the page stops responding then I have to close the page. If remove the dropdown from the modal popup, everything works fine. Below is the sample razor code. I appreiate your help. 

<TelerikDialog @bind-Visible="@ShowDialog" @ref="@DialogRef" Title="MyTelerikDialogTitle" Width="400px" >
    <DialogContent>
            <TelerikForm Id="MyTelerikForm"
                         Model="@MyModel"
                         OnValidSubmit="@OnOkSubmit"
                         OnUpdate="@OnFormUpdate"
            @ref="@FormRef">
                <FormValidation>
                    <DataAnnotationsValidator />
                </FormValidation>
                <FormItems>
                    <FormItem Field="@nameof(MyDto.Name)" LabelText="Name" /><FormItem Field="@nameof(MyDto.Address)" LabelText="Address" /> <FormItem Field="@nameof(MyDto.Zipcode)" LabelText="Zipcode" />
                    <FormItem Field="@nameof(MyDto.State)">
                        <Template>
                            <label for="StateName">State Name:</label>
                            <TelerikDropDownList @bind-Value="@MyItem" 
                                                 DefaultText="Choose a state"
                                                 Data="@StateNameDropDown"
                                                 Id="StateName">
                                <DropDownListSettings>
                                    <DropDownListPopupSettings Height="auto" />
                                </DropDownListSettings>
                            </TelerikDropDownList>
                        </Template>
                    </FormItem>  ...

Da
Top achievements
Rank 1
 updated question on 22 Nov 2023
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?