Telerik Forums
UI for Blazor Forum
1 answer
8 views
Hi,

I have a PivotGridColumn:

<PivotGridColumns>
    <PivotGridColumn Name="@nameof(PivotIpEncounterDetail.Year)"></PivotGridColumn>
</PivotGridColumns>
And I have the data loaded in for the pivot grid in reverse year order (example 2022, 2021, 2020), but when I go to test the grid the columns are reordered in ascending order. By design, I'm not allowed to add extra complexity of the configurator, as our users will only be shown one specific view with an optional aggregation.

What can I leverage to get the columns in the correct order?

Edited to add details:
Using a Local DataProviderType, 2 PivotGridRows, 1 PivotGridMeasure (Sum). 
All the internal guts of the grid itself are fine (numbers are where they should be, etc.),

Just can't seem to reorder the year columns programatically.
Nansi
Telerik team
 answered on 26 Jul 2024
1 answer
8 views

Hello, 

 

I am attempting to install the trial version of Telerik UI for Blazor on a brand new .NET 8 Blazor WebAssembly Standalone App project that has not been setup with the sample pages (an empty project). I have followed the WebAssembly setup tutorial in the Telerik UI for Blazor documentation. However, when I run the application the page is using Times New Roman as the font. Does the default theme (kendo-theme-default) use the Times New Roman font? If not, how can I change my application to use the font that is intended to be used with the default theme (kendo-theme-default)? If neither of these options are available, what is the best practice way of setting the font for the entire application?

 

Thank you!

Svetoslav Dimitrov
Telerik team
 answered on 25 Jul 2024
0 answers
2 views

Hi,

I've been following this example regarding opening a context menu when right clicking an appointment https://github.com/telerik/blazor-ui/blob/master/scheduler/appointment-context-menu/ and I'm wondering if it's possible to access the Date of the specific occurrence that was clicked when using recurring appointments.

For example being able to access Mon, 7/22 when right clicking on it to then assigning it to a private variable on the page and such?

Best Regards,

Marzuk

Marzuk
Top achievements
Rank 1
 asked on 24 Jul 2024
0 answers
4 views

Visual Studio has this Feature.

  1. Create Blazor Web Project
  2. Right click Project, select "Add" and "New Scaffolded Item..."
  3. You get a list of templates, I believe from here GitHub - dotnet/Scaffolding: Code generators to speed up development.

Does Telerik plan on adding any templates for New Scaffolded Item?

I have imagined I chose "EF Core API to Telerik Grid" as a template.  I select the DbContext and Entity from a wizard and press Go. Then it will scaffold for me, with wonderfully crafted models and dependency injection repository pattern, service pattern, controller patterns:

  1. Server Side
    1. DTO Model or database model
    2. Mapping from Entity to DTO
    3. Repository Pattern: Entity Repository with CRUD
    4. Service to Call Repository
    5. Controller to call Service
  2. Client Side
    1. View Model
    2. Mapping from DTO to View Model
    3. HTTP Service to call Controller 
  3. Razor Page with Telerik Grid
    1. Using View Model to build default columns
    2. Default Telerik Editor features
      1. Or a choice between in-line and modal editors
    3. Razor.cs calls HTTP Service
    4. Razor.cs has all CRUD functions

Why? Because I've done this cookie-cutter, boilerplate type of thing so many times I think it should become a candidate for integration into Visual Studio as "Add New Scaffolded Item".

Does Telerik plan to work on this?  Perhaps I could help contribute

Jonathan
Top achievements
Rank 1
 asked on 24 Jul 2024
0 answers
2 views

I would like to change the Panelbar backgound based on the hierarchy level.

I have 3 level nesting in the PanelBarItem collections. On each level I would like a different color/background color scheme.

This is my PanelBarItem class


public class PanelBarItem
{
    public int Level {  get; set; }
    public string Text { get; set; }
    public bool Disabled { get; set; }
    public string Url { get; set; }
    public object Icon { get; set; }
    public List<PanelBarItem> Items { get; set; }
}

and this is my PanelBar data


    private List<PanelBarItem> LoadFAQData()
    {
        List<PanelBarItem> items = new List<PanelBarItem>()
        {
            new PanelBarItem()
            {
                Level=0,
                Text = "Provider Transactions",
                Icon = SvgIcon.Accessibility,
                Items = new List<PanelBarItem>()
                {
                    new PanelBarItem()
                    {
                        Level=1,
                        Text = "Can I perform both DDE and HIPAA batch transactions?",
                        Icon = SvgIcon.QuestionCircle,
                        Items = new List<PanelBarItem>()
                        {
                            new PanelBarItem()
                            {
                                Level=2,
                                Text = "Basic registration gives you the ability to perform DDE Transactions. You must check the box labeled \"I would like to do HIPAA Transactions\" and complete all required fields for HIPAA Batch Transactions."
                            }
                        }
                    },
                    new PanelBarItem()
                    {
                        Level=1,
                        Text = "Why can't I submit a claim to this website?",
                        Icon = SvgIcon.QuestionCircle,
                        Disabled = false,
                        Items = new List<PanelBarItem>()
                        {
                            new PanelBarItem()
                            {
                                Level=2,
                                Text = "Under HIPAA, health plans are permitted to choose the coordination of benefits (COB) model they wish to perform, either the Provider-to-payer or the payer-to-payer method. We have chosen to use the payer-to-payer method of COB. We have entered into trading partner agreements with the Medicare contractors. These agreements permit us to receive claims electronically directly from Medicare. If you submit a claim to Medicare for one of the Policyholder s listed on our eligibility file, you need do nothing more, Medicare will forward the claim to us for processing."
                            }
                        }
                    },
                    new PanelBarItem()
                    {
                        Level=1,
                        Text = "Is pre-certification required?",
                        Icon = SvgIcon.QuestionCircle,
                        Disabled = false,
                        Items = new List<PanelBarItem>()
                        {
                            new PanelBarItem()
                            {
                                Level=2,
                                Text = "No. However, Medicare Select policies require prior approval for scheduled admissions to non-network hospitals. Please contact the claims customer service department at 1-877-825-9337 for further assistance. "
                            }
                        }
                    },
...

George
Top achievements
Rank 1
Iron
Iron
 asked on 24 Jul 2024
1 answer
12 views
I have a RadioGroup that I am using a TemplateItem to display three radio buttons.  When any of the radio buttons are selected another small set of form fields are enabled and if the radio button is deselected the same form fields are disabled.
This works well but I would like to add field validation to the mix by enabling field validation for the form fields when they are active and removing the validation when they are not active.
I've tried creating some custom attribute validators but am not sure how to pick up the action of selecting a radio button.  
Any ideas on how to best accomplish this task?

i.e. In the picture below, I only wish to validate the Month/Date/Year if the "End by" radio is selected & only validate the numeric field if the "End after" radio is selected. 
    <ItemTemplate Context="context2">
                    @{
                            var item = (ScheduleEndModel)context2;
                            if (item.Id == 1)
                            {
                                AppState.Schedule.IsEndNever = false;
                                <strong>
                                  End by:
                                </strong>
                                <TelerikDatePicker 
                                    @bind-Value="@AppState.Schedule.EndDate" 
                                    OnChange="@StateChangeTrigger"
                                    Min="@DateTime.Today"
                                    Max="@DateTime.MaxValue"
                                    Format="MM/dd/yyyy"
                                    DebounceDelay="@DebounceDelay"
                                    ShowWeekNumbers="true"
                                    Width="10vw" 
                                    Enabled="@EnableOnDate">
                                    <DatePickerFormatPlaceholder Day="Day" Month="Month" Year="Year" />
                                    </TelerikDatePicker>
                            }else
                            if (item.Id == 2)
                            {
                                AppState.Schedule.IsEndNever = false;
                                <strong id="endtype1">
                              End after:
                                </strong>
                                <TelerikNumericTextBox @bind-Value="@AppState.Schedule.EndAfterOccurrenceCount" OnChange="@StateChangeTrigger" Width="7vw" Enabled=@EnableAfterCount></TelerikNumericTextBox> <strong>occurrence(s)</strong>

                            }
                            else if (item.Id == 3)
                            {
                                AppState.Schedule.IsEndNever = true;
                                <strong>
                                No end
                                </strong>                            
                            }
                        }
                    </ItemTemplate>
                </TelerikRadioGroup>

Nadezhda Tacheva
Telerik team
 answered on 23 Jul 2024
1 answer
9 views

Hi,

I have a treelist where the parentID is a GUID so it is defined as a string.

The child items don't appears.

It seems that string is not supported in ParentID.

Any turn around for that?

Best regards.

Dimo
Telerik team
 answered on 19 Jul 2024
1 answer
7 views

Hi,

I have a TreeView where the initial values are set programmatically.

When all the child nodes are checked the parent node should be checked as well. But it isn't:
https://blazorrepl.telerik.com/GIOLlWks03IKIiiZ31

Is there any solution for that?

 

Best regards,

Rayko

Dimo
Telerik team
 answered on 19 Jul 2024
1 answer
10 views

Hello,

I'm having an hard time to understand why my error arent showing in my blazor app when they happen inside the OnClick event of an DropDownButtonItem.

I've joined some code to reproduce the problem. When you click on "twitter" inside the Share DropDownButton, you should be able to see the "System.Exception" in the console log of the browser (f12) but nothing happen.

I can clearly see the "1" from the Console.WriteLine right before it but not the exception.

In my program, I was expecting to see our custom error handling to catch that error and show an error message to the client, but instead, nothing happen since we dont know the code failed, nor do we receive any answer

Thank you

<div class="demo-section auto">
    <TelerikDropDownButton Icon="@SvgIcon.Share">
        <DropDownButtonContent>Share</DropDownButtonContent>

        <DropDownButtonItems>
            <DropDownButtonItem Icon="@SvgIcon.Twitter" OnClick="@(()=>OnItemClick("Twitter"))">Twitter</DropDownButtonItem>
        </DropDownButtonItems>

    </TelerikDropDownButton>
</div>

@code {
    private void OnItemClick(string item)
    {
        Console.WriteLine(1);
        throw new System.Exception();
        Console.WriteLine(2);
    }
}


Nadezhda Tacheva
Telerik team
 answered on 18 Jul 2024
3 answers
32 views

Working on a Blazor WASM app (.NET 8) and seeing the error below in the browser's console after successful Hot Reload from VS2022 and clicking on any button in the app. Same button works fine before the Hot Reload. The issue is not limited only to buttons. I believe this started with the latest VS update (17.10.3). The Telerik version we're using is old, 4.3.0, however we never had that particular issue before.

Anybody having the same issues? Is this VS issue?

Thank you,

Stefan

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Microsoft.JSInterop.JSException: Cannot read properties of null (reading 'addEventListener')
TypeError: Cannot read properties of null (reading 'addEventListener')
    at gD.bindEvents (http://localhost:5137/_content/Telerik.UI.for.Blazor/js/telerik-blazor.js:50:1844171)
    at gD.onAfterShow (http://localhost:5137/_content/Telerik.UI.for.Blazor/js/telerik-blazor.js:50:1844381)
    at Module.fe (http://localhost:5137/_content/Telerik.UI.for.Blazor/js/telerik-blazor.js:50:1044593)
    at http://localhost:5137/_framework/blazor.webassembly.js:1:2878
    at new Promise (<anonymous>)
    at b.beginInvokeJSFromDotNet (http://localhost:5137/_framework/blazor.webassembly.js:1:2835)
    at Object.vn [as invokeJSJson] (http://localhost:5137/_framework/blazor.webassembly.js:1:58849)
    at http://localhost:5137/_framework/dotnet.runtime.8.0.5.gongq8hbow.js:3:178364
    at Tl (http://localhost:5137/_framework/dotnet.runtime.8.0.5.gongq8hbow.js:3:179198)
    at wasm://wasm/00b2193a:wasm-function[349]:0x1fab4
   at Microsoft.JSInterop.JSRuntime.<InvokeAsync>d__16`1[[Microsoft.JSInterop.Infrastructure.IJSVoidResult, Microsoft.JSInterop, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext()
   at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
   at Telerik.Blazor.Components.Dialog.DialogBase.InvokeOnAfterShowAsync()
   at Telerik.Blazor.Components.Dialog.DialogBuilder.OnAfterRenderAsync(Boolean firstRender)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Nadezhda Tacheva
Telerik team
 answered on 17 Jul 2024
Top users last month
Michael
Top achievements
Rank 2
Iron
Wilfred
Top achievements
Rank 1
Alexander
Top achievements
Rank 2
Iron
Iron
Matthew
Top achievements
Rank 1
Iron
ibra
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?