Telerik Forums
UI for Blazor Forum
0 answers
237 views
Hello. 
I have a treelist whose nodes can be expanded or not. I would like that when a search is performed, the resulting nodes are all expanded. 
In the documentation I can't find events like OnSearch, BeforeSearch, AfterSearch... so that I can change the state of the nodes after a search is performed. 
Are these SearchBox events accessible. If not, any idea how to achieve my goal? 

Thank you very much. 
Blazorist
Top achievements
Rank 2
Bronze
Iron
Iron
 updated question on 26 Jul 2022
1 answer
180 views

I have added a templated column to my grid that contains hyperlinks.  However, I'm not able to navigate to it within the same context as navigating the grid with the arrow keys.  So, if I set focus in the grid, and then use the arrow keys to navigate to the cell with the link in it, I would expect that pressing the Enter Key will put the focus on the link so that I can press enter again to navigate to the link's destination.  This is functionality similar to how the GridCommandColumn works where pressing enter on the cell that has the focus, navigates into the cell and puts the focus on the first button in that cell. Then you can hit enter to activate the button or escape to exit back out to focus back on the cell.

Your documentation in the keyboard navigation demo even says that it should do this here:

  • Enter activates editing for the data cell when the grid is in InCell EditMode. In EditMode – saves changes and closes the editor. When a header cell is focused applies sorting. When a hierarchy cell is focused expands/collapses the detail template. When a template cell or a command cell is focused, focuses the first focusable element inside.
  • Is this a bug, or is there something that I need to do to make it work for a template column?  Here's a repl copied from your keyboard navigation demo that illustrates the issue:
  • https://blazorrepl.telerik.com/cQELQuvs25Rykh2B47
Svetoslav Dimitrov
Telerik team
 answered on 25 Jul 2022
1 answer
304 views

I checked the following example:

Treeview Data Binding to Hierarchical Data

Let's say ProductCategoryItem has a second list, e. g. "Orders".

public class ProductCategoryItem
{
    public string Category { get; set; }
    public List<ProductItem> Products { get; set; }
    public List<OrderItem> Orders {get; set; }
}

public class ProductItem
{
    public string ProductName { get; set; }
}

public class OrderItem
{
    public string OrderName { get; set; }
}

How can I display this second list "Orders" in TreeView?

<TelerikTreeView Data="@HierarchicalData" @bind-ExpandedItems="@ExpandedItems">
    <TreeViewBindings>
        <TreeViewBinding TextField="Category" ItemsField="Products" />
        <TreeViewBinding Level="1" TextField="ProductName" />
        ??? <TreeViewBinding TextField="Category" ItemsField="Orders" /> ???
    </TreeViewBindings>
</TelerikTreeView>
Regards
Heiko
Hristian Stefanov
Telerik team
 answered on 25 Jul 2022
2 answers
433 views

Scenario:

Want to save and restore the GridState between sessions to save the users columns being displayed, sort order and filter status.

Problem:

If the code to the TelerikGrid is changed between saving and restoring the GridState, the TelerikGrid will not display the data correctly at a minimum and at worst can crash Blazor circuit completely.

Solution:

Restoring a GridState from a previous version of the GridState should not crash the site on the restore.  It should realize the state isn't valid for this TelerikGrid and should do no harm.

Workaround:

Is there a coding pattern for saving and restoring GridState to local storage that would work around column changes between saving and restoring the GridState?

Repro:

  1. Save the GridState to local storage, so that user can come back later and the state is restored to provide the same view to the user.


  2. Change the code for the Telerik Grid Control to show completely different columns. 
  3. The user comes back to the UI and the code restored the GridState from the previous save before TelerikGrid was changed.



  4. Best case, the TelerikGrid format restored doesn't match what was saved previously and columns displayed are inconsistent to what was saved previously is the best case and need to reset the GridState.

    GridState<PackageRequest> desiredState = new GridState<PackageRequest>();

  5. Worst case, the TelerikGrid throws a unhandled System.ArgumentException exception and crashes the entire page.
    (see attached screen shot and the exception from Azure App Insights).

 

 

 

Jerdobi
Top achievements
Rank 1
Iron
Iron
 answered on 22 Jul 2022
1 answer
143 views

Hello,

the first Output of "i" (<GridColumn Title="@($"Grid {i}")">) works, the Output is 1,2,3,4,...10, but the second output (<p>@($"pos: {ctx.GridSizePosition} - i: {i}")</p>) "i" is always 11 (the last value +1 from of the loop).

            <GridColumn Field="@(nameof(ArticlePriceSize.PriceListKey))" />
            @{
                for (int i = 0; i <= 10; i++)
                {
                    <GridColumn Title="@($"Grid {i}")">
                        <Template>
                            @{
                                var ctx = context as ArticlePriceSize;
                                <p>@($"pos: {ctx.GridSizePosition} - i: {i}")</p>
                            }
                        </Template>
                    </GridColumn>
                }
            }
            <GridColumn Field="@(nameof(ArticlePriceSize.AMSGridSizePosition))" />

How can I use the variable "i" in the Template?

Hristian Stefanov
Telerik team
 answered on 22 Jul 2022
2 answers
155 views

I made a custom filter using FilterCellTemplate, now i would like to add filter operator and filter clear button.

For filter clear button it's simple just adding <TelerikButton OnClick="ClearLogic"><span class="k-icon k-i-filter-clear k-button-icon"></TelerikButton>

 

but how to add filter operator selection?

default filter operator selection is a TelerikDropdownList without span.k-input-inner element, and with k-filter-icon in the button, how can i reply this component? there is one out of the box?

Thanks

 

Svetoslav Dimitrov
Telerik team
 answered on 22 Jul 2022
1 answer
260 views

Hi,

I'm trying to figure out the range snapping when dragging a task in the Gantt timeline. I'm looking to implement a method to snap the task to the start of the day and not show any hours or minutes when dragging the start or end of the task.
Is there a way to customize the tooltip shown while dragging a task? (circled in red in the following screenshot)



I noticed the RangeSnapTo setting for the Gantt in the API reference, but that had no effect on the snapping behavior when dragging the task, or when dragging the start or end of the task. Am I missing something here?

The actual effect I'm trying to achieve is snapping to business days, so Saturdays and Sundays are ignored, but still visible as days in the Gantt chart. Any tips on how to achieve such behavior?

Kind Regards!

Nadezhda Tacheva
Telerik team
 answered on 21 Jul 2022
1 answer
261 views

Hello

I am implementing DateRangePicker with null start and end date. When user open calendar he sees Min date instead of current date.

How can I move the focus from the Min date to the current date at the time the calendar is opened?

Hristian Stefanov
Telerik team
 answered on 21 Jul 2022
1 answer
487 views

Hello

I am implementing Custom Filter Row. The main task is to implement Check Box List in the row filter (multi select).
Could someone please provide information how can I implement Custom Row Filter like Check Box List Filter for Filter menu?

 

Hristian Stefanov
Telerik team
 updated answer on 21 Jul 2022
1 answer
131 views

I have a Grid, for each column i set the width setting the property

Width="@DescriptionWidth"

When the grid is not in filter mode (FilterMode = GridFilterMode.None) i call AutoFitColumnsWidthAsync to autofit the columns.

When it is in filter mode i would like to have a bigger column size to allow the filter render correctly,

so i set the DescriptionWidth property who is binded to the Width of the column, but it not work if previously was called AutoFitColumnsWidthAsync.

 

There is a way to clear the settings done by AutoFitColumnsWidthAsync and allow to keep the binded property width?

Here a sample code:

https://blazorrepl.telerik.com/wmYrFDYh20r6bnFB33

 

Thanks

Dimo
Telerik team
 answered on 21 Jul 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?