Telerik Forums
UI for Blazor Forum
0 answers
291 views

Hi I would like to make a better filter function for the TreeView. Some of the features I would like are.

  • Expand all nodes that are found
  • Highlight them
  • Maybe only high light the text that are found

 

Has any one created such a function?

Martin Herløv
Top achievements
Rank 2
Bronze
Iron
Iron
 asked on 04 Nov 2021
1 answer
906 views

I have a grid with a column that has department code as its data. I use templates to display the actual department name in the grid and for editing, grouping, and filtering. When I sort the column, it sorts it by the department code and not the displayed department name. How can I get it to sort by the department name and not the department code?

 

        <GridColumn Field="DeptCode" Width="200px" title="Department" Editable="CurrentUser.IsAdmin" >
            <EditorTemplate>
                @{
                    CurrentlyEditedRecord = context as Data.InvRecord;
                    <TelerikDropDownList Data="@Departments"
                                         @bind-Value="@CurrentlyEditedRecord.DeptCode"
                                         TextField="DeptNameFull" ValueField="DeptCode"
                                         Width="100%" PopupHeight="50%">
                    </TelerikDropDownList>
                }
            </EditorTemplate>
            <Template>
                @{
                    // a Template is used to show the foreign key data that is user-friendly
                    string DepartmentCode = (string)(context as Data.InvRecord).DeptCode;
                    CIEData.EntityClasses.VaiDepartmentEntity matchingPos = Departments.FirstOrDefault(r => r.DeptCode == DepartmentCode);
                    string textToRender = matchingPos != null ? matchingPos.DeptNameFull : "Unknown";
                    <text>@textToRender</text>
                }
            </Template>

            <GroupHeaderTemplate>
                @{
                    string Id = (string)context.Value;
                    CIEData.EntityClasses.VaiDepartmentEntity matchingPos = Departments.FirstOrDefault(r => r.DeptCode == Id);
                    string textToRender = matchingPos != null ? matchingPos.DeptNameFull : "Unknown";
                    <text>@textToRender</text>
                }
            </GroupHeaderTemplate>

            <FilterMenuTemplate>
                <div class="filterTemplate">
                    @foreach (var x in Departments)
                    {
                        <div>
                            <TelerikCheckBox Value="@(context.FilterDescriptor.FilterDescriptors.Select(f => (f as FilterDescriptor).Value).ToList().Contains(x.DeptCode))"
                                             TValue="bool"
                                             ValueChanged="@((value) => UpdateCheckedDeptStatus(value, x.DeptCode, context))"
                                             Id="@($"dept_{x.DeptCode}")">
                            </TelerikCheckBox>
                            <label for="@($"dept_{x.DeptCode}")">
                                @if (x == null) // part of handling nulls - show meaningful text for the end user
                                {
                                    <text>Empty</text>
                                }
                                else
                                {
                                    @x.DeptNameFull
                                }
                            </label>
                        </div>
                    }
                </div>

            </FilterMenuTemplate>
        </GridColumn>
Marin Bratanov
Telerik team
 answered on 04 Nov 2021
5 answers
1.0K+ views

I don't see it listed in the Blazor themebuilder, am I missing something?  

https://themebuilder.telerik.com/blazor-ui

 

 

JeffVisibilEDI
Top achievements
Rank 1
Iron
 answered on 03 Nov 2021
1 answer
225 views

Hi how can I remove the expand icons for leaf nodes?

Martin Herløv
Top achievements
Rank 2
Bronze
Iron
Iron
 answered on 03 Nov 2021
0 answers
478 views

Requirement:

Blazor UI web app -> user select and upload excel file

Blazor UI web app -> convert this excel into JSON (column names to properties, column values to values)

Question:

What would be the best way to achieve this? Is there any component/library that we can use?

 

Thanks,

Artem

 

 

Artem
Top achievements
Rank 1
Veteran
 asked on 02 Nov 2021
1 answer
516 views
I need to use the TelerikMultiSelect with a specified Height and Width, I see how to do this, and even set the PopupCss. My Question is, say I want my MultiSelect box width to be 200px, how could I have when some selects more than one item, the box would then say 'Multiple Selected'. I'm searching but not sure how I could accomplish this.
Nadezhda Tacheva
Telerik team
 answered on 02 Nov 2021
0 answers
210 views

I have a Tabstrip control on a Blazor page. Each tab is represented by a component. In each component's code I have a static value i.e.

string  staticValue = "Page1Value"

On the parent page I would like to access the "staticValue" value for the currently active tab/child component. It seems that there should be a simple way to do this. I'm finding lots of commentary on pushing parent values to the child and pushing a changed value to the parent via events. But nothing about a parent retrieving a simple static value from a child.

Jstemper
Top achievements
Rank 2
Bronze
Iron
 asked on 01 Nov 2021
1 answer
999 views
Is there some functionality for moving cards around, similar to trello?
Dimo
Telerik team
 answered on 01 Nov 2021
1 answer
307 views

Is there a way to have the toolbar not wrap buttons down to a new line and instead have them appear in some sort of over flow menu?

For example, here is the default on a small screen:

But make it look more like this when it does not fit on a single row:

 

Nadezhda Tacheva
Telerik team
 answered on 01 Nov 2021
2 answers
1.8K+ views

I have an EditForm with a DropDownList (among other things) and when my OnValidSubmit fires I do what I need to do and then I want to clear the controls so the user can select different values and submit again. The problem is the drop down doesn't clear when I set the selected value to null. I wrote a test app to demonstrate it. When the app loads nothing is selected. If you select the item in the drop down and then click the "clear selection" button it doesn't clear. What do I need to do to make that work?

 

@page "/"

<br />

<TelerikButton OnClick="@ClearSelection">Clear selection</TelerikButton>
<TelerikDropDownList Data="@data" @bind-Value="selectedValue" />

@code {
    List<string> data = new() { "selection" };
    string selectedValue;

    void ClearSelection()
    {
        // This does not cause the drop down to deselect the selected item
        selectedValue = null;
        StateHasChanged();
    }
}
Hristian Stefanov
Telerik team
 answered on 01 Nov 2021
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?