Telerik Forums
UI for Blazor Forum
1 answer
17 views
We use a NumericTextbox for amounts. The "Format" parameter is set to "###,###,###,###,##0.00". It should now be possible to copy already formatted numeric values (with thousands separator) into the textbox. However, this only accepts unformatted numerical values:

100000 <-- works
100000,23 <-- works 
100,000.23 <-- does not work

Depending on the language/culture, the thousands separator changes (either '.' or ',').
As soon as the number contains a thousands separator, the textbox no longer recognises the value as a number and does not accept the value.

Is there a way to achieve this?
Hristian Stefanov
Telerik team
 answered on 02 Apr 2024
1 answer
19 views
I have a TelerikGrid that contains many columns and a DetailTemplate within it. The Grid has functionality for multiselect with a checkbox column that appears as the first column on the grid. Is it possible to move this checkbox column in front of the detail template '+' dropdown row?
<TelerikGrid data="@models"
     <DetailTemplate>
          <GridColumns><GridColumns />
     <DetailTemplate />
     <GridColumns>
          <GridColumn>Checkbox Here<GridColumn />
     <GridColumns />
<TelerikGrid />

Hristian Stefanov
Telerik team
 answered on 02 Apr 2024
1 answer
16 views

On the Filter component I have observed that when it is added to a Dialog component it no longer functions correctly. You can add filters but can't remove any of them without generating an exception.

The Filter component will allow you to add filters but if you click the 'x' to remove a filter it will not remove. Clicking the 'x' again results in an error:

Unhandled exception rendering component: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')

Exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at System.Collections.ObjectModel.Collection`1.RemoveAt(Int32 index)
at Telerik.Blazor.Components.Filter.FilterGroup.OnFilterRemove(Int32 index, String removedFilterId)
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

 

I also noticed that if you remove the binding from the Filter it fails the same way: https://blazorrepl.telerik.com/weEHQCQa49xsfTxF28

 

Nansi
Telerik team
 answered on 01 Apr 2024
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
1 answer
18 views

I am using a form component as a read only display of my model.

I am using auto generated fields and don't want to define my form items manually if I don't have to. 

Is there an easy way to disable the entire form?

Hristian Stefanov
Telerik team
 answered on 01 Apr 2024
2 answers
11 views

We have a need to enable non-linear access to our wizard. However, at the final confirmation page, we need to validate the user has completed the forms. There appears to be a bug that we cannot check if each form is valid on the final page. I've put together an example that shows 3 pages. When clicking next, I'm calling validate on each form then displaying the boolean value from each form in a dialog box. You can see that when a form is not visible to the user, the validate method always returns true.

Is there a workaround we can implement until this is fixed by Telerik?

https://blazorrepl.telerik.com/myEnGhbz35WxeVpM30

Jon
Top achievements
Rank 1
Iron
 answered on 01 Apr 2024
1 answer
10 views

I have a basic .net8 project , the VS template one, I following the instructions to hook up telerik to it.

The btn works.

I then added a grid, which shows up, but I see no records in it. I dont see what I am doing wrong.

razor page:

@page "/GridTester"
<h3>GridTesting</h3>

<h1>@strTaskDone</h1>

<TelerikLoaderContainer Visible="@ldrVisible" Class="no-panel">
    <Template>
        <TelerikLoader></TelerikLoader>
        <div>
            <span></span>
            <span>Please wait, I am currenlty working on it...</span>
        </div>
    </Template>
</TelerikLoaderContainer>


<TelerikGridLayout>
    <GridLayoutColumns>
        <GridLayoutColumn Width="100%"></GridLayoutColumn>    
    </GridLayoutColumns>
    <GridLayoutRows>   
        <GridLayoutRow Height="@strAppMsgHT"></GridLayoutRow>               @*App Msg*@   
        <GridLayoutRow Height="@strGridHT"></GridLayoutRow>                 @*Report Grids *@
    </GridLayoutRows>
     <GridLayoutItems>
        <GridLayoutItem Row="1" Column="1" >
            <TelerikButton OnClick="@SayHelloHandler"
                           ThemeColor="@ThemeConstants.Button.ThemeColor.Primary">Say Hello</TelerikButton>
        </GridLayoutItem>
         <GridLayoutItem Row="2" Column="1" ColumnSpan="2">
            <TelerikGrid @ref="@gridOrderListDetails"
                         Data="@grdOrderListDetails"
                         AutoGenerateColumns="true"
                         Width="800px"
                         Pageable="true"
                         Sortable="true"
                         FilterMode="@GridFilterMode.FilterRow">
            </TelerikGrid>
        </GridLayoutItem>
    </GridLayoutItems>
</TelerikGridLayout>

code behind stuff for the Grid:

 public TelerikGrid<rtpOrderListDetailsResults> gridOrderListDetails { get; set; }  // grid on the webpage
 private List<rtpOrderListDetailsResults> grdOrderListDetails { get; set; }

 DataTable dt = new DataTable();
 SqlConnection con = new SqlConnection(strConn);
 SqlDataAdapter da = new SqlDataAdapter(strCMDToRun, con);
 da.SelectCommand.CommandTimeout = 540000;
 da.Fill(dt);
 foreach (DataRow row in dt.Rows)
 {
     if (dt.Columns.Count == 1)
     {
         ResultRow = new rtpOrderListDetailsResults();
         ResultRow.PON = row["Result"] as string;
     }
     else
     {
         ResultRow = new rtpOrderListDetailsResults();
         ResultRow.PON = row["PON"] as string;
         ResultRow.Customer_ID = (Int64)row["Customer_ID"];
         ResultRow.Customer_Name_Billing = row["Customer_Name_Billing"] as string;
         ResultRow.Parent_Name = row["Parent_Name"] as string;
         ResultRow.TN = row["TN"] as string;
         ResultRow.Nbr_Of_Actual_Lines = (Int32)row["Nbr_Of_Actual_Lines"];

         if (row["CreatedDT"] != DBNull.Value)
         {
             d = DateOnly.FromDateTime((DateTime)row["CreatedDT"]);
             ResultRow.CreatedDT = d;
         };

         if (row["DueDT"] != DBNull.Value)
         {
             d = DateOnly.FromDateTime((DateTime)row["DueDT"]);
             ResultRow.DueDT = d;
         };

         ResultRow.Current_Status = row["Current_Status"] as string;

         if (row["Current_StatusDT"] != DBNull.Value)
         {
             d = DateOnly.FromDateTime((DateTime)row["Current_StatusDT"]);
             ResultRow.Current_StatusDT = d;
         };
         // ResultRow.Current_StatusDT = row["Current_StatusDT"] as DateTime?;

         ResultRow.Provisioner_Assigned = row["Provisioner_Assigned"] as string;
         ResultRow.Agent_Is = row["Agent_Is"] as string;
         ResultRow.Carrier = row["Carrier"] as string;
         ResultRow.Carrier_ID = (Int32)row["Carrier_ID"];
         ResultRow.Provisioning_Process = row["Provisioning_Process"] as string;
         ResultRow.Class = row["Class"] as string;
         ResultRow.Provisioning_Age_Days = (Int32)row["Provisioning_Age_Days"];
         ResultRow.Order_Type = row["Order_Type"] as string;
         ResultRow.Line_Type = row["Line_Type"] as string;
         ResultRow.Line_Description = row["Line_Description"] as string;
         ResultRow.State = row["State"] as string;
         ResultRow.Open_Related_Orders = row["Open_Related_Orders"] as string;
         ResultRow.Channel = row["Channel"] as string;
         ResultRow.Bill_Profile = row["Bill_Profile"] as string;

         ResultRow.MRC_ChargesAmt = (decimal)row["MRC_ChargesAmt"];
         ResultRow.MRC_Line_ChargesAmt = (decimal)row["MRC_Line_ChargesAmt"];

         ResultRow.Cancel_Reason = row["Cancel_Reason"] as string;
         ResultRow.Hold_Reason = row["Hold_Reason"] as string;
         ResultRow.Prime = row["Prime"] as string;
         ResultRow.Cycle_Is = (Int32)row["Cycle_Is"];
         // ResultRow.Impacted_By_COVID19 = row["Impacted_By_COVID19"] as string;
         ResultRow.Term_Nber_Of_Months = (Int32)row["Term_Nber_Of_Months"];
         ResultRow.Upload = row["Upload"] as string;
         ResultRow.Download = row["Download"] as string;
         ResultRow.AMProjectManager = row["AMProjectManager"] as string;

         RptResults.Add(ResultRow);
     };


 };

 grdOrderListDetails = RptResults;

 if (gridOrderListDetails.Data.Count() > 0)
 {
     gridOrderListDetails.AutoFitAllColumns();
 };

 if (grdOrderListDetails.Count > 0)
 {
     strTaskDone = "Completed";
 }
 else
 {
     strTaskDone = "Me Sad";
 };

This has data: grdOrderListDetails.Count

But this is NULL: gridOrderListDetails.Data

Why? 

 

Nadezhda Tacheva
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
1 answer
10 views

Hy,

I created a generic class for telerik grids to manage different data models.

In this class I use OnRead event for reading data :

 protected async Task OnReadHandlerAsync(GridReadEventArgs args)
 {
     try
     {
         var query = Service.QueryDto();
         query = DefaultFilterCondition is not null ? query.Where(DefaultFilterCondition) : query;
         var dataSourceResult = await query.ToDataSourceResultAsync(args.Request);
         if (args.Request.Aggregates.Any())
         {
             args.AggregateResults = dataSourceResult.AggregateResults;
         }
         args.Data = dataSourceResult.Data;
         args.Total = dataSourceResult.Total;
     }
     catch (Exception ex)
     {
         NotificationService.Error(ex.Message);
     }
 }

As you can see I use the ToDataSourceResult extension on a variable of type IQueryable<TDto> for automatic sorting, filtering,paging,...

But now I have a problem: I created a grid that contains aggregates, now for this TelerikGrid the application throws the "must be reducible node exception" when the "ToDataSourceResult" is executed on the IQueyable<TDto> variable. 

My TelerikGrid with aggregates:

@inherits GridReadOnlyComponentBase<SimulationResultService,SimulationResultDto>
<TelerikGrid Id="simulationresultgrid"
             @ref="GridRef"
             TItem="SimulationResultDto"             
             OnStateInit="@OnStateInitHandler"
             FilterMode="@GridFilterMode.FilterRow"
             EditMode="@GridEditMode.None"
             SelectionMode="@GridSelectionMode.None"             
             Sortable="@true" SortMode="@SortMode.Single"
             Groupable="@true" LoadGroupsOnDemand="@false"
             Reorderable="@false"                                                                 
             OnRead="@OnReadHandlerAsync">

     <GridAggregates>
        <GridAggregate Field="@nameof(SimulationResultDto.ActualSales)" Aggregate="@GridAggregateType.Sum" FieldType="typeof(decimal)" />
        <GridAggregate Field="@nameof(SimulationResultDto.YearImpact)" Aggregate="@GridAggregateType.Sum" FieldType="typeof(decimal)" />
        <GridAggregate Field="@nameof(SimulationResultDto.ChangesImpact)" Aggregate="@GridAggregateType.Sum" FieldType="typeof(decimal)" />
    </GridAggregates> 

    <NoDataTemplate>
        <strong>@(_simulationId > 0 ? "Nessun dato presente,eseguire prima una simulazione" : "Scegli la simulazione")</strong>
    </NoDataTemplate>

    <GridToolBarTemplate>
        <span class="k-toolbar-spacer" />
        <SimulationSelect SelectedValue="_simulationId" SelectedValueChanged="SimulationIdChanged" Width="30%" />
    </GridToolBarTemplate>

    <GridColumns>        
        <GridColumn Field="@nameof(SimulationResultDto.ActualSales)"
                    Title="Fat. attuale"
                    Width="200px" DisplayFormat="{0:C}"
                    Filterable="false"
                    Groupable="false">
             <GroupFooterTemplate>
                TOT: <TelerikNumericTextBox Width="80%" ReadOnly="@true" Arrows="@false" Decimals="2" Format="C" @bind-Value="@context.Sum" />
            </GroupFooterTemplate> 
        </GridColumn>        
    </GridColumns>

I know that a solution could be to run the ToList before running the ToDataSourceResult but I would like to know if there is another solution as I work with a large amount of data.

Thanks

Svetoslav Dimitrov
Telerik team
 answered on 28 Mar 2024
0 answers
7 views
I have a ChartSeries and I set the ChartMarkerType.  I want to be able to click on the point in the chart and change that single point's size and color.  For example, if all the points on the ChartSeries and color:red/size:10, I want to change that point to color:green/size15.  The rest of the points stay color:red/size:10
Chance Robertson
Top achievements
Rank 1
 asked on 26 Mar 2024
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?