Telerik Forums
UI for Blazor Forum
1 answer
156 views

Hello,

The Drag & Drop operation between treeviews is difficult when the tree is empty or mostly empty. The only valid drop targets are existing nodes. I would like to see the empty space in a treeview also available as a drop target. Can we log this as a request? In the meantime is it possible to drop a node on an empty treeview?

Thank You,

-Andy

Nadezhda Tacheva
Telerik team
 answered on 01 Jul 2022
1 answer
666 views

This turned out to be a cache problem. Thought I cleared it, but apparently not. Today it works.

I'm trying to implement some very basic toast notifications in a simple form WASM app.

There are two code paths where notifications would be displayed, based on form data. One of them works perfectly every time. The other refuses to work at all, despite the code being called.

I've tried all of the usual Visual Studio things (clean, deleting bin/obj, restarting, etc.) and the behavior persists. There's nothing in the browser's console to indicate a failure.
This is my first attempt at using a Telerik control. It's also my first real Blazor app. Maybe there's something basic I didn't do correctly that's causing weird side effects. Nothing else really makes sense considering how simple this code is.

Here's the UI bits...

<TelerikNotification @ref="@NotificationReference" Class="MyTelerikNotification" VerticalPosition=NotificationVerticalPosition.Top HorizontalPosition=NotificationHorizontalPosition.Center></TelerikNotification>
<h3>@FlightTitle</h3>
<ul>
    @foreach (var question in ThisFlightForm.Form.TrueFalseQuestions)
    {
        <FormQuestionTrueFalse thisFormItem=question />
    }
</ul>
<div>
    <button @onclick="OnClick_BtnSubmit" class="btn">Submit</button>
    <button @onclick="OnClick_BtnCancel" class="btn">Cancel</button>
</div>

Inside the code block is the Notification Reference declaration:

public TelerikNotification NotificationReference { get; set; } = new();

Here's the method call that's having issues. The obvious thing to check is the value of canSubmit, which works perfectly fine.
If I put the ShowToasts calls from the IF down into the ELSE, they are fine.

private void OnClick_BtnSubmit()
    {
        var canSubmit = _preSubChecks.CanFormBeSubmitted(ThisFlightForm);
        if (canSubmit.ChecksPassed)
        {
            //this does not work at all, despite being called
            ShowToasts($"Unable to submit form - {canSubmit.ErrorMsg}", ThemeConstants.Notification.ThemeColor.Error);
            ShowToasts("Submitting Form", ThemeConstants.Notification.ThemeColor.Info);
            ShowToasts("Success!", ThemeConstants.Notification.ThemeColor.Success);
        }
        else
        {   //this works fine
            ShowToasts($"Unable to submit form - {canSubmit.ErrorMsg}", ThemeConstants.Notification.ThemeColor.Error);
        }

    }

Here's the method that shows the toast notifications. I added a temp var and a console out so I could verify the object wasn't null for some reason.

private void ShowToasts(string msg, string toastType)
    {
        var tmpNm = new NotificationModel()
            {
                Text = msg,
                ThemeColor = toastType,                
            };
        NotificationReference.Show(tmpNm);
        Console.WriteLine(JsonConvert.SerializeObject(tmpNm));
    }

Here's the output from the console logs where the Notification control refuses to display (the if):

{"ThemeColor":"error","Closable":true,"CloseAfter":5000,"ShowIcon":true,"Icon":null,"Text":"Unable to submit form - "}
{"ThemeColor":"info","Closable":true,"CloseAfter":5000,"ShowIcon":true,"Icon":null,"Text":"Submitting Form"}
{"ThemeColor":"success","Closable":true,"CloseAfter":5000,"ShowIcon":true,"Icon":null,"Text":"Success!"}

The first Notification (the error) is only here just to make sure the problem wasn't the content or the Notification display type being a problem.

Here's the output from the one that works (the else):

{"ThemeColor":"error","Closable":true,"CloseAfter":5000,"ShowIcon":true,"Icon":null,"Text":"Unable to submit form - At least one question was not answered"}

Aside from the Text, this is exactly the same as the error notification I put into the code that refuses to work.

Adam
Top achievements
Rank 1
Iron
 answered on 01 Jul 2022
1 answer
219 views

Hello, 

Here is the issue we encoure since version 3.3.0 of Telerik for Blazor.
Everything worked fine in version 3.2.0. We have a simple Input model, and a classic form.
The behavior that we want is "when Value1 changes, Value2 must change with custom logic". 

Here is our code: 

<p>Value1 : @Person.Value1</p>
<p>Value2 : @Person.Value2</p>

<TelerikForm Model="@Person">
    <FormValidation>
        <DataAnnotationsValidator></DataAnnotationsValidator>
    </FormValidation>
    <FormItems>
        <FormItem Field="@(nameof(Person.Value1))">
            <Template>
                <label class="k-label k-form-label">Value 1</label>
                <div class="k-form-field-wrap">

                    <TelerikNumericTextBox Decimals="2"
                                           Format="C"
                                           Min="0"
                                           Step="0.01m"
                                           ValueChanged="@((decimal? v) => Value1ChangedHandler(v))"
                                           Value="@Person.Value1"
                                           ValueExpression="@(() => Person.Value1)">
                    </TelerikNumericTextBox>
                    <TelerikValidationMessage For="@(() => Person.Value1)"></TelerikValidationMessage>
                </div>
            </Template>
        </FormItem>

        <FormItem Field="@(nameof(Person.Value2))">
        </FormItem>
    </FormItems>
</TelerikForm>

public partial class Example
{
    private Input Person { get; set; } = new();

    protected override void OnInitialized()
    {
        Person = new()
        {
            Value1 = 1000,
            Value2 = 2000,
        };

        base.OnInitialized();
    }

    private void Value1ChangedHandler(decimal? newValue1)
    {
        this.Person.Value1 = newValue1;
        this.Person.Value2 = newValue1 * 2; // We tried to add StateHasChanged(), but not working as well
    }
}

public class Input
{
    public decimal? Value1 { get; set; } 
    public decimal? Value2 { get; set; }
}

I attach two GIF recordings, the first is version 3.2.0 (working as expected), the second is version 3.3.0, you will see that the behavior is very odd.

Thanks a lot in advance.
// Dylan

Radko
Telerik team
 answered on 01 Jul 2022
1 answer
878 views

How can I change the PlaceHolder inner text color? 

 

Nothing seems to be working...

<TelerikTextBox Value="@_searchVariable" PlaceHolder="Search Variables" ValueChanged="@(BuildTree)"></TelerikTextBox>

 

Dimo
Telerik team
 answered on 30 Jun 2022
1 answer
231 views

Hi,

I have an issue with some dropdown lists not opening when Filterable is enabled.

This only occurs when displaying dropdowns in a modal popover when using Blazored Modal; https://github.com/Blazored/Modal.

If Filterable is disabled, the dropdowns open.

Every other component work fine, but the dropdown list.

Does anyone know why this is happening?
Tsvetomir
Telerik team
 answered on 30 Jun 2022
1 answer
191 views

Hi, there's any chance to use OnExpand treeview event inside filemanager to refresh treeview subdir of the expanding folder?

My file system contain tons of files and subfolder for dozens of hyerarchical subfolders.

The example present in your demo that preload hyerarchical subfolders inside Data isn't a solution for me.

 

Svetoslav Dimitrov
Telerik team
 answered on 30 Jun 2022
1 answer
415 views
I need to draw a number of shapes (rectangles connected lines, like org charts, but not an org chart) and let users interact with them with Telerik Blazor handling all other UI. Are there any plans to have diagrams functionality like the Kendo UI jQuery Diagrams?
Nadezhda Tacheva
Telerik team
 answered on 29 Jun 2022
1 answer
310 views

hi,

I cannot seem to find multi-level support on the listview like shown in the two examples below from a different Blazor

can you please direct me to this feature and usage(if it exists) or give me some hints on how I can Achieve this with this with a combination of existing components

Thanks for your help

Alain

 

Dimo
Telerik team
 answered on 29 Jun 2022
2 answers
543 views
seems even having multiple selection we just can drag and drop items one by one, am I right? basically having access to selected items & grop event i can code workaround & move them myself, but hope that we have it out of the box, do we?  
Andrew
Top achievements
Rank 1
Iron
Iron
 answered on 28 Jun 2022
1 answer
407 views
I would like to use the Open Iconic font icons in the drawer element instead of the default Telerik icons.  
I can get  the css class to reflect the classes for the icons but the component insists on also adding the k-icon & k-i- classes into the class section of the before span.  The k-icon class and k-i- partial class name override the oi & oi-flag class I specify.  

How do I use the Open Iconic fonts in the DrawerItem section?  
Dimo
Telerik team
 answered on 28 Jun 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?