Telerik Forums
UI for Blazor Forum
1 answer
165 views

Hi there,

I use the sample code in here and I can see the scrollable icon.

But when I try to add tabs by button click , the scrollable  icon is not shown.

How to fix it?


<TelerikTabStrip Scrollable="true"
                 Width="300px"
                 TabPosition="Telerik.Blazor.TabPosition.Top">
    @{
        for (int i = 0; i < tabCount; i++)
        {
            var title = "long long long-" + @i.ToString();
            
            <TabStripTab Title="@title" @key="@i">
                Tab content.
            </TabStripTab>
        }
    }
</TelerikTabStrip>

<TelerikButton OnClick="AddTab">add tab</TelerikButton>

@code {
    int tabCount = 0;

    void AddTab()
    {
        tabCount++;
        StateHasChanged();
    }
}

Brandon
Top achievements
Rank 1
Iron
 answered on 23 Nov 2022
0 answers
191 views

Hi Team,

Currently I am using Telerik UI Blazor with 3.7.0 version, few cases and intermittently TooltipShowEvent.Click is not working and tooltip is not getting displayed and unable to find root cause for it.

Could you please assist what is causing for this behavior and feasible solution?

Below is sample code snippet where we use 3 tabs

<TelerikTabStrip Class="tmGraphTabStrip" ActiveTabIndex="@ActiveTab" ActiveTabIndexChanged="@ActiveTabChanged" @ref="@TabRef">
@for (var i = 0; i < 4; i++)
 {
<TabStripTab Title="@TabName" Class="tmTabHeaderCellStyle">
<TelerikGridLayout RowSpacing="20px" ColumnSpacing="1px" Class="grid-CardlayoutNew">
@*
display data in gridlayout structure for each row/column along with tooltip, we are able to see div selector and target selector Ids from Dev Tools browser
*@
</TelerikGridLayout>
</TabStripTab>
}
</TelerikTabStrip>

Ex:

<TelerikTooltip TargetSelector="@ToolTipCurselector" ShowOn="@TooltipShowEvent.Click" Position="TooltipPosition.Top">
</TelerikTooltip>

Vinod
Top achievements
Rank 1
 asked on 22 Nov 2022
0 answers
140 views

Scenario:

Put a visual Linear Gauge into a GridColumn so to show a visual perspective of a count instead of a number.

Issue:

On first page render the Grid to the page, the TelerikLinearGauge shows.   If I exit to another page and then come back to the page, the TelerikLinearGauge will not render, and the column is now blank.  

How to Refresh:

There must be some trick to having the image of the gauge re-render on subsequent refreshes of the page.  I hate guessing and think this is a typical scenario that should be documented on your site.  Right?

Preferred Approach:

The Linear Gauge will render and refresh just like all the other columns without custom workarounds and/or techniques.

 

Telerik.Blazor.Components.TelerikLinearGauge LinearGaugeRef { get; set; }

Code:

 <GridColumn Field="@nameof(PackageRequest.ViewCount)" Title="Views" Width="40px" Visible="false">
            <Template>
                @{
                    var item = context as PackageRequest;
                    @if (item.ViewCount > 0)
                    {
                        <TelerikLinearGauge>
                            <LinearGaugeScales>
                                <LinearGaugeScale Min="0" Max="@TotalViewCount" Vertical="false">
                                    <LinearGaugeScaleMinorTicks Visible="false"></LinearGaugeScaleMinorTicks>
                                </LinearGaugeScale>
                            </LinearGaugeScales>
                            <LinearGaugePointers>
                                <LinearGaugePointer Value="@item.ViewCount" />
                            </LinearGaugePointers>
                        </TelerikLinearGauge>
                    }
                }
            </Template>
        </GridColumn>
Jerdobi
Top achievements
Rank 1
Iron
Iron
 updated question on 22 Nov 2022
1 answer
209 views
If I use anything other than pixels (or if I don't set it at all) I get an error. My app will be running on a cell phone or tablet which could be in portrait or landscape orientation so setting the size in pixels doesn't work very well.
Dimo
Telerik team
 answered on 21 Nov 2022
0 answers
207 views
Hi Telerik,

I'm excited with the FileManager component. Do this component support with the Amazon S3 bucket folder?
Could we have some demo project with this feature, and it will be awesome.
David
Top achievements
Rank 1
 asked on 21 Nov 2022
0 answers
273 views
I have a wizard with 3 steps and I want to persist the content because I don't want to lose the content's (components) data while navigating between steps.
Luyeye
Top achievements
Rank 1
 asked on 21 Nov 2022
0 answers
191 views

Blazor server doesn't work at all when AdBlocker is on.

 

Any workaround?

 

 

Ilan
Top achievements
Rank 1
Bronze
Iron
Veteran
 asked on 20 Nov 2022
1 answer
189 views

Good Morning,

I vave this code. I try to create a FluentValdation in TelerikForm, code builts good.  When i submit empty form, validations are good(), but the form doesn't show the errors.


<TelerikForm Model="@TriggerDetail" Columns="1" ColumnSpacing="25px" OnValidSubmit="@HandleValidSubmit" EditContext="@EditContext">
    <FormValidation>
        <FluentValidationValidator Validator="@Validator"></FluentValidationValidator>
    </FormValidation>    
    <FormItems>
        <FormGroup LabelText="General Information" Columns="2" ColumnSpacing="15px">
            <FormItem Field="@nameof(TriggerDetailModel.Name)" LabelText="@Localizer["JobTrigger_Name"]" Enabled="@Enabled"></FormItem>
            <ValidationMessage For="@(() => TriggerDetail.Name)" />
            <FormItem Field="@nameof(TriggerDetailModel.Group)" LabelText="@Localizer["JobTrigger_Group"]" Enabled="@Enabled">
                <Template>
                    <label class="k-label k-form-label">@Localizer["JobTrigger_Group"]</label>
                    <TelerikAutoComplete Data="@ExistingTriggerGroups" @bind-Value="@TriggerDetail.Group" ClearButton="true" Enabled="@Enabled" />
                </Template>
            </FormItem>
			<ValidationMessage For="@(() => TriggerDetail.Group)" />
		</FormGroup>
	</FormItems>
	<FormButtons>       
            <TelerikButton Icon="caret-alt-to-left" OnClick="@BackStep" ThemeColor="@(ThemeConstants.Button.ThemeColor.Error)">@Localizer["Back"]</TelerikButton>
            <TelerikButton ButtonType="ButtonType.Submit" Icon="caret-alt-to-right" ThemeColor="@(ThemeConstants.Button.ThemeColor.Info)">@Localizer["Next"]</TelerikButton>        
    </FormButtons>
</TelerikForm>
	
	
@code{
	public TriggerDetailModel TriggerDetail { get; set; } = null!;
	public TriggerDetailValidator Validator { get; set; } = new();
	
    private void HandleValidSubmit()
    {
        var validationResult = Validator.Validate(TriggerDetail);
        if (validationResult.IsValid)
        {
            NextStep();
        }
        else
        {
            //Errores
        }            
    }
}

public class TriggerDetailValidator : AbstractValidator<TriggerDetailModel>
{                
        public TriggerDetailValidator()
        {           
            RuleFor(t => t.Name).NotEmpty();
            RuleFor(t => t.Group).NotEmpty();
        }
}

Where is the problem?

 

Thanks

Svetoslav Dimitrov
Telerik team
 answered on 18 Nov 2022
1 answer
155 views
Here is the sample that shows what is the issue.
Just check any child and click "clear" button. The "full checks" are removed correctly, but indeterminate ones stays.
@* Enable the CheckParents parameter and observe the behavior of this setting. *@

<TelerikTreeView Data="@FlatData"
                 @bind-ExpandedItems="@ExpandedItems"
                 CheckParents="true"
                 CheckBoxMode="@TreeViewCheckBoxMode.Multiple"
                 @bind-CheckedItems="@checkedItems">
    <TreeViewBindings>
        <TreeViewBinding IdField="Id" ParentIdField="ParentIdValue" TextField="Text" HasChildrenField="HasChildren" IconField="Icon" />
    </TreeViewBindings>
</TelerikTreeView>

<div>
    Checked items:
    <ul>
        @if (checkedItems.Any())
        {
            foreach (var item in checkedItems)
            {
                var checkedItem = item as TreeItem;
                <li>
                    <span>
                        <TelerikIcon Icon="@checkedItem.Icon"></TelerikIcon>
                    </span>
                    <span>
                        @(checkedItem.Text)
                    </span>
                </li>
            }
        }
    </ul>
    <button @onclick="Clear">clear</button>
</div>


@code {
    public IEnumerable<object> checkedItems { get; set; } = new List<object>();

    public class TreeItem
    {
        public int Id { get; set; }
        public string Text { get; set; }
        public int? ParentIdValue { get; set; }
        public bool HasChildren { get; set; }
        public string Icon { get; set; }
    }

    public IEnumerable<TreeItem> FlatData { get; set; }
    public IEnumerable<object> ExpandedItems { get; set; } = new List<TreeItem>();

    protected override void OnInitialized()
    {
        LoadFlatData();
        ExpandedItems = FlatData.Where(x => x.HasChildren == true).ToList();
    }

private void Clear() {
    checkedItems = new List<object>();
        StateHasChanged();
}

    private void LoadFlatData()
    {
        List<TreeItem> items = new List<TreeItem>();

        items.Add(new TreeItem()
        {
            Id = 1,
            Text = "Project",
            ParentIdValue = null,
            HasChildren = true,
            Icon = "folder"
        });

        items.Add(new TreeItem()
        {
            Id = 2,
            Text = "Design",
            ParentIdValue = 1,
            HasChildren = true,
            Icon = "brush"
        });
        items.Add(new TreeItem()
        {
            Id = 3,
            Text = "Implementation",
            ParentIdValue = 1,
            HasChildren = true,
            Icon = "folder"
        });

        items.Add(new TreeItem()
        {
            Id = 4,
            Text = "site.psd",
            ParentIdValue = 2,
            HasChildren = false,
            Icon = "psd"
        });
        items.Add(new TreeItem()
        {
            Id = 5,
            Text = "index.js",
            ParentIdValue = 3,
            HasChildren = false,
            Icon = "js"
        });
        items.Add(new TreeItem()
        {
            Id = 6,
            Text = "index.html",
            ParentIdValue = 3,
            HasChildren = false,
            Icon = "html"
        });
        items.Add(new TreeItem()
        {
            Id = 7,
            Text = "styles.css",
            ParentIdValue = 3,
            HasChildren = false,
            Icon = "css"
        });

        FlatData = items;
    }
}
Am I doing something wrong?
Dimo
Telerik team
 answered on 18 Nov 2022
0 answers
229 views

Hi,

Is there any way to add Footer Template to a column of Grid in blazor by C# code?

Vinh
Top achievements
Rank 1
 updated question on 18 Nov 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?