Telerik Forums
UI for Blazor Forum
1 answer
186 views

I would like to use the Scheduler for visualizing resource scheduling by day.  Each row would be a resource and each column a day.  Is there a way to turn off the hours and hide the column with "all day" and the hours in it?

Thanks,

Brad

 

Marin Bratanov
Telerik team
 answered on 05 Oct 2021
1 answer
179 views

I've created a component for picking a sorting field, that consists in a TelerikDropDownList where I've added a button with an icon to specify the sorting order

something like this


<TelerikDropDownList Value="_sortingValue.Value" Data="Choices"
                     PopupHeight="auto" PopupWidth="200px"
                     Class="max-w-min flex-grow"
                     ValueChanged="@((TEnum sorting) => OnSortChanged(sorting))">

   <ItemTemplate>@ValueTranslator(context)</ItemTemplate>
   <ValueTemplate>
      <div class="flex flex-row items-center">
         <button class="flex items-center text-primary p-2 hover:text-secondary" @onclick="()=> OnChangeOrder(_sortingValue.Order)" @onclick:stopPropagation="true"><Icon>@GetSortIcon(_sortingValue.Order)</Icon></button>
         <div>@ValueTranslator(context)</div>
      </div>
   </ValueTemplate>


What I want to do is being able to click the sorting icon without causing the DDL to open

I tried adding

@onclick:stopPropagation="true

on the button but it doesn't work.
Is like if you have some kind of javascript that register a click on any item within the ValueTemplate and it causes the drop down list to open ignoring my stopPropagation

Can you help me solve the problem?

Thanks

Dimo
Telerik team
 answered on 05 Oct 2021
1 answer
238 views

I would like to have two or more category axes, where in this example, I would like all the months for each year to be displayed above the year. Both year and month should use the same value series "YAxis".

But I can't figure out how to get this result.

How it looks now:

How it should look:

Code:

<div style="height: 80vh;">
    <TelerikChart Height="100%">
        <ChartLegend Visible="false" />
        <ChartTooltip Visible="true" Background="white" Color="black">
            <Template>
                <div>
                    <strong>@context.SeriesName:</strong> @string.Format("{0:N0}", Convert.ToDouble(context.FormattedValue.ToString().Replace('.', ',')))
                </div>
            </Template>
        </ChartTooltip>
        <ChartSeriesItems>
            <ChartSeries Type="ChartSeriesType.Column" Data="Data" Field="Value" CategoryField="Month">
            </ChartSeries>
            <ChartSeries Visible="false" Data="Data" Field="Value" CategoryField="Year" CategoryAxis="secondAxis">
            </ChartSeries>
        </ChartSeriesItems>

        <ChartValueAxes>
            <ChartValueAxis Min="0">
                <ChartValueAxisLabels Format="{0:N0}"></ChartValueAxisLabels>
                <ChartValueAxisTitle Text="Value"></ChartValueAxisTitle>
            </ChartValueAxis>
        </ChartValueAxes>

        <ChartCategoryAxes>
            <ChartCategoryAxis></ChartCategoryAxis>
            <ChartCategoryAxis Name="secondAxis"></ChartCategoryAxis>
        </ChartCategoryAxes>
    </TelerikChart>
</div>
@code {
    public class ModelData
    {
        public int Year { get; set; }
        public string Month { get; set; }
        public int Value { get; set; }
    }

    public List<ModelData> Data = new List<ModelData>()
    {
        new ModelData() { Year = 2019, Month = "Jan", Value = 1000 },
        new ModelData() { Year = 2019, Month = "Feb", Value = 2554 },
        new ModelData() { Year = 2019, Month = "Mar", Value = 9000 },
        new ModelData() { Year = 2020, Month = "Jan", Value = 5250 },
        new ModelData() { Year = 2020, Month = "Feb", Value = 3400 },
        new ModelData() { Year = 2020, Month = "Mar", Value = 7540 },
        new ModelData() { Year = 2021, Month = "Jan", Value = 4570 },
        new ModelData() { Year = 2021, Month = "Feb", Value = 7860 },
        new ModelData() { Year = 2021, Month = "Mar", Value = 1670 },

    };
}

NuGet might be missing when downloading the example.

Thanks
Regards,
Nikolas

 
Nikolas
Top achievements
Rank 2
Iron
Iron
 answered on 05 Oct 2021
1 answer
355 views

Has anyone else had a problem with removing files using TelerikUpload?  Upload works fine, but when attempting to remove it hits the Remove method, but the files parameter is null.  I have tried changing the parameter type from string to string[], IFormFile and IEnumerable<IFormFile>.  I've tried changing the parameter name (and corresponding RemoveField), and nothing makes any difference.  I can add a second, custom parameter, and that works ok.  I just can't get a value for files.

Selected markup/code:

                        <TelerikUpload SaveUrl="@(AddDocumentApi())"
                                   Multiple="true"
                                   RemoveUrl="@(RemoveDocumentApi())"
                                   OnUpload="OnUploadHandler"
                                   OnRemove="OnRemoveHandler"
                                   OnSuccess="OnSuccessHandler"
                                   WithCredentials="true"
                                   AllowedExtensions="@AllowedExtensions" />

 

        public string RemoveDocumentApi() => $"{AddDocumentApiBase}/deletedocument";

        [HttpPost("deletedocument")]
        public async Task<IActionResult> DeleteDocument(string files)
        {
             // Hits a breakpoint here but files is null
            return new EmptyResult();
        }

Dean
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 04 Oct 2021
1 answer
423 views

I have 5 columns but only want to show two of them in reading mode.

When create or update I would like a pop-up edit showing all of the fields.

How do I accomplished this?

Marin Bratanov
Telerik team
 answered on 02 Oct 2021
1 answer
190 views

I can't find a way to customize the GridCheckboxColumn element.

GridColumn have a Template element but seem not applicable to GridCheckboxColumn.

My goal is to add a clickable icon next to selection check in the header.

How to solve?

Thanks

Marin Bratanov
Telerik team
 answered on 30 Sep 2021
1 answer
304 views

Hi, i use a TelerikGrid component and i would like to change the UI on grid selection change, so i have:

<TelerikGrid @ref="Grid" ... />

...

@if (Grid?.SelectedItems.Count() > 0)

{

<span>There are items selected!</span>

}


but the message is never displayed even when i select rows on grid.

I noted who if i bind the event SelectedItemsChanged then the SelectedItems property is updated correctly, and the message is diplayed:

<TelerikGrid @ref="Grid" SelectedItemsChanged="@OnSelectedItemsChanged" ... />

...

@if (Grid?.SelectedItems.Count() > 0)

{

<span>There are items selected!</span>

}

 

Why i need to bind SelectedItemsChanged event even if don't use it?

 

Thanks

 

Marin Bratanov
Telerik team
 answered on 30 Sep 2021
1 answer
969 views

Is there a way to add some delay to the TelerikTooltip component show event? I would like to force the user to hover in the element for a couple of seconds before he can see the tooltip.

Thanks,

Hristian Stefanov
Telerik team
 answered on 30 Sep 2021
1 answer
111 views
so if you have several options to select from in pager & selected non default one (100 - default, 200 - selected) than filter or sort grid, the value in pager will be reset to default 
Dimo
Telerik team
 answered on 29 Sep 2021
1 answer
164 views

Hi,

I have a WPF app that uses Telerik controls and Telerik charting.  This WPF app is now being re-written using Blazor WebAssembly using Telerik Blazor controls and Telerik Blazor charting.  Some of the existing WPF charts have custom context menus that allow users to toggle between displaying the charts with values or displaying the values as percentages.

It seems that the WPF RadChart control supports different format expressions:

https://docs.telerik.com/devtools/wpf/controls/radchart/features/format-expressions

The toggling is achieved by changing the series item label formats e.g.

    Private Sub PercentagesContextItem_Checked(sender As System.Object, e As System.Windows.RoutedEventArgs)
        For Each objMapping In RadChart1.SeriesMappings
            objMapping.SeriesDefinition.ItemLabelFormat = "#STPERCENT{P0}"
        Next
    End Sub

    Private Sub PercentagesContextItem_Unchecked(sender As System.Object, e As System.Windows.RoutedEventArgs)
        Dim strCurrencyMajorSymbol As String = WebContext.Current.User.CurrencyMajorSymbol
        For Each objMapping In RadChart1.SeriesMappings
            objMapping.SeriesDefinition.ItemLabelFormat = strCurrencyMajorSymbol & "#DATAITEM.ValueY{###,###,##0.00}"
        Next
    End Sub

Is it possible to achieve this in Blazor WebAssembly using the Telerik Blazor charting controls and if so, how?

 

 

 

Marin Bratanov
Telerik team
 answered on 28 Sep 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?