Telerik Forums
UI for Blazor Forum
1 answer
1.1K+ views

I have hidden some columns using the code

<GridColumn Field="@nameof(DataEntryExternalUser.Name)" Editable="true" Visible="@IsVisible"/>

So when I edit in a pop-up form I set IsVisible=true;

The problem I have now is with exporting data. Only the visible columns is exported.

Can I somehow set IsVisible=true before triggering the export command?

Have tried setting it in the OnClick handler. Not working.
<GridCommandButton OnClick="@ShowLoadingSign" Command="ExcelExport" Icon="file-excel">Export to Excel</GridCommandButton>


Marin Bratanov
Telerik team
 updated question on 06 Oct 2021
1 answer
193 views

Hi guys,

My goal would be to store/retrieve my state from a database but I fail to understand how we can get the id of the reordered/resizeded tile?

The TileLayoutState has no reference of the moving TileItem, the header text or any data really.

It looks like it works with a defined set of TileItems but what if you don't know their numbers and positions or wish to change it? 

The SetState can't help with that because the initial State will not be the same.

With my attached example, I have an initial Step1.png state, I change it to Step2.png. After my change one of the Test tiles is removed in the backend. How can I make sure next time I load the page I get Step2.png but without one of the Test tiles?

Am I missing something or is it a limitation? 

Thank you for your help and keep up the good work on Blazor !

Marin Bratanov
Telerik team
 answered on 06 Oct 2021
1 answer
118 views

"Circular"

Is it possible to make the Radar Area circular?

How it looks now:

How it should look:

"Bug"

I also have a problem with the ChartValueAxis, I need to set the ZIndex to 1. If I don't, then the numbers disappear underneath the chart if I change the opacity on the series to 1. Is this normal behaviour, or?

Normal:

ZIndex 1:

Code:

<ChartValueAxes>
        <ChartValueAxis>
            <ChartValueAxisLabels Format="{0:N0}"></ChartValueAxisLabels>
        </ChartValueAxis>
    </ChartValueAxes>
---------------------------------
<ChartValueAxes>
        <ChartValueAxis ZIndex="1">
            <ChartValueAxisLabels Format="{0:N0}"></ChartValueAxisLabels>
        </ChartValueAxis>
    </ChartValueAxes>

Thanks
Regards,
Nikolas

 

Marin Bratanov
Telerik team
 answered on 06 Oct 2021
1 answer
416 views

Having a great time building with the lattest Blazor Ui components.  Though I am having issues setting the initial Checked State on a Heirachical Data Model. Pretty certain everything is setup correctly:

 

 

I am setting the collection at the OnAfterRenderAsync as I am loading the data from LocalStorage. Unfortunately rather than Checking the Child Notes, the Parent Node is always selected. Note below the circled Itetms are in the CheckedSourceDatas collection but the parent is always checked (below)

 

Any pointede would be greatly appreciated. Thanks in advance.

 

 

Nadezhda Tacheva
Telerik team
 answered on 06 Oct 2021
1 answer
1.5K+ views

I am filling my drop down from a data table. The Value and the Text are the same string. The Value
is also a string that matches the ValueField string. But when the DropDown Renders the value is not selected
and just shows a blank. How do I get the selected value to be selected?

<TelerikDropDownList Data="@MyVM.ContactFormatList" TextField="@nameof(QuerySelector.ColumnName)" Filterable="true" ValueField="@nameof(QuerySelector.ColumnName)" DefaultText="Select Contact Format" @bind-Value="@MyVM.selectedContactFormat">

</TelerikDropDownList>

MyVM.ContactFormatList = list of QuerySelectors

 public class QuerySelector
    {
        public string ColumnName { get; set; }
        public string Value { get; set; }
    }

 

Property in my MyVM

      public string selectedContactFormat { get; set; }



Marin Bratanov
Telerik team
 answered on 05 Oct 2021
1 answer
215 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
226 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
271 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
387 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
457 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?