Telerik Forums
UI for Blazor Forum
0 answers
4 views

I'm currently trying to integrate telerik tilelayout inside telerik tabstrip dynamically?

for example

        <TabStripTab Class="@(filteredRows.Any() ? GetTabWidth() : "auto")"  Title="@tabtitle1["tabtitle"].ToString()">
                 <TelerikTileLayout Columns="12"
               RowHeight="auto"
               Resizable="true"
               Reorderable="true">
<TileLayoutItems>
                    @foreach (DataRow row in filteredRows)
                    {

                        <_Data columnspan='Convert.ToInt32(row["columnspan"])' rowspan='Convert.ToInt32(row["rowspan"])' pageId="@pageId" oDt="row" encryptQueryString="@data"></_Data>
                    }
                </TileLayoutItems>
            </TelerikTileLayout>
                </TabStripTab>
            }                                   
            @if (filteredRows2.Any())
            {

        <TabStripTab Title="@tabtitle2["tabtitle"].ToString()">

            <TelerikTileLayout Columns="12"
                               RowHeight="auto"
                               Resizable="true"
                               Reorderable="true">
                <TileLayoutItems>
                    @foreach (DataRow row in filteredRows2)
                    {

                        <_Data columnspan='Convert.ToInt32(row["columnspan"])' rowspan='Convert.ToInt32(row["rowspan"])' oDt="row" data="@data"></_Data>
                    }
                </TileLayoutItems>
            </TelerikTileLayout>

                </TabStripTab>

when i set persist content to true it reloads the components which invoke the database calling ?I s there any way to do without component being refreshed?

                                             
Leo
Top achievements
Rank 1
 asked on 20 May 2024
0 answers
15 views

I have a layout of three tiles like so:

<TelerikTileLayout Columns="3"
                   RowHeight="18vh"
                   Resizable="true"
                   Reorderable="true"
                   >

    <TileLayoutItems>
        <TileLayoutItem RowSpan="2" ColSpan="2">
            <Content>
                content
            </Content>
        </TileLayoutItem>
        <TileLayoutItem RowSpan="4">
            <Content>
                content
            </Content>
        </TileLayoutItem>
        <TileLayoutItem RowSpan="2" ColSpan="2">
            <Content>
               content
            </Content>
        </TileLayoutItem>
    </TileLayoutItems>
</TelerikTileLayout>
I would like the tile layout to stay 4 rows in height, however when a user reorders one of the tiles in a certain way, it extends it down to a 5th row, and displaces one of the tiles in an unpleasing way, which I've shown in the attached image. I want to restrict the tile layout so that it stays 4 rows deep, but still allow my users to rearrange the tiles within that restricted space. Is this possible?
Zachary
Top achievements
Rank 1
 updated question on 30 Apr 2024
1 answer
46 views

Hi there!

I have created a component (Component) that is a TileLayoutItem. It renders fine for the first time but it doesn't re-render after its properties changes (OnClickHandler).

Am I doing something wrong? The exact same code works if added directly on Main.

Running example: https://blazorrepl.telerik.com/mnbQmvlX24maslQE52

Component

<TileLayoutItem>
    <HeaderTemplate>
        <a href="#">Component<span class="k-icon k-i-caret-alt-right widget-title-icon"></span></a>
    </HeaderTemplate>
    <Content>
        @test
        <TelerikButton OnClick="@OnClickHandler">Click me!</TelerikButton>        
    </Content>
</TileLayoutItem>
@code {
    private string test = "Button was not clicked yet";
    private void OnClickHandler(MouseEventArgs args)
    {
        test = "Button was clicked at: " + DateTime.Now.ToString();            
    }
}

Main

<TelerikTileLayout Columns="1">
    <TileLayoutItems>
        <Component></Component>
        <Component></Component>
        <TileLayoutItem>
            <HeaderTemplate>
                <a href="#">TileLayoutItem<span class="k-icon k-i-caret-alt-right widget-title-icon"></span></a>
            </HeaderTemplate>
            <Content>
                @test
                <TelerikButton OnClick="@OnClickHandler">Click me!</TelerikButton>        
            </Content>
        </TileLayoutItem>
    </TileLayoutItems>
</TelerikTileLayout>
@code {
    private string test = "Button was not clicked yet";

    private void OnClickHandler(MouseEventArgs args)
    {
        test = "Button was clicked at: " + DateTime.Now.ToString();            
    }
}

Radko
Telerik team
 answered on 25 Dec 2023
1 answer
299 views

Hello all,

In my app I use tile layout to let the user manage a bunch of charts and other things. when in "edit mode" I want the headers of the tiles to be displayed, but in "browse" mode I want the headers of the tiles to be invisible as the title of the tile et all is already in the chart displayed in the tiles content.

Using an empty <HeaderTemplate> I still get an empty  one line header for each tile.

Is there a way around this,? Otherwise, please see this as a FR.

Regards,

Hans

Hristian Stefanov
Telerik team
 answered on 05 Jun 2023
1 answer
142 views

I'm working on a landing page builder, I need to be able to do a couple of extra things with TileLayout. I would like this behaviour to be added optionally by configuration. 

 

I would like to Drag & Drop elements between two TelerikTileLayout collections.

In my dahsboard I want to have groups of tiles, like the ones in SAP launchpad, here are some images. I want to move tiles from one section to another.

https://experience.sap.com/wp-content/uploads/sites/56/2021/06/SAP-Fiori-Launchpad-Spaces_MyHome_1.96.png

 

I would like to specify the actual position of a element with the Row & Column index.

I want to build a launchpad like the one in Azure. Here are some images of what I want to build. As you can see, you are free to chose any row/col you want in the grid.

https://media.licdn.com/dms/image/C5112AQGroL99SJPhag/article-cover_image-shrink_720_1280/0/1559712744601?e=2147483647&v=beta&t=0_c13EnPEq_pxXxf8SNuH1jzC4_N8hUYR_uf2kUKmSA

https://adamtheautomator.com/wp-content/uploads/2022/09/image-93.png

Nadezhda Tacheva
Telerik team
 answered on 03 Apr 2023
1 answer
179 views

Hi there,

I'm facing a problem with charts in a tile layout. I have a TileLayout in my applicaton and added some charts (which are in another component) to it. I checked the documentation about TileLayout and resizing so I followed those steps. Please check out my code:

Razor MainPage:

<TelerikTileLayout Columns="5"
           ColumnWidth="300px"
           Reorderable="true"
           Resizable="true"
           OnResize="TileItemResize">
    <TileLayoutItems>
        <TileLayoutItem HeaderText="My Item Text" RowSpan="2">
            <Content>
                <TurnoverComparisonWidget @ref="TurnoverComparisonRef" SelectedWidget="widget" IsLoad="true"></TurnoverComparisonWidget>
            </Content>
        </TileLayoutItem>
    </TileLayoutItems>
</TelerikTileLayout>


Razor TurnoverComparisonWidget:

<TelerikChart @ref="ChartRef" Height="100%">
    <ChartTooltip Visible="true"></ChartTooltip>

    <ChartSeriesItems>
        <ChartSeries Type="ChartSeriesType.Column" Data="ChartData" Field="@nameof(ChartDataItem.Value)" CategoryField="@nameof(ChartDataItem.CategoryName)">
            <ChartSeriesLabels Visible="true" Format="{0:C2}"></ChartSeriesLabels>
        </ChartSeries>
    </ChartSeriesItems>
</TelerikChart>


C# MainPage:

public TurnoverComparisonWidget TurnoverComparisonRef { get; set; }

private void TileItemResize()
{
    TurnoverComparisonRef.Refresh();
}


C# TurnoverComparisonWidget:

public TelerikChart ChartRef { get; set; }

public void Refresh()
{
    ChartRef.Refresh();
}

But the chart is not resizing when I resize the tile layout item. It just stays the same size and never changes. Did I forget anything? I can't figure it out.

Best Regards,
Roman

Yanislav
Telerik team
 answered on 18 Jan 2023
1 answer
94 views

The example for the OnReorder feature returns a null result. The Id (args.Id) is never shown in the console log message.

 

@* Handle the OnResized event *@ <TelerikTileLayout Columns="3" Reorderable="true" OnReorder="@OnReorderHandler"> <TileLayoutItems> <TileLayoutItem HeaderText="Panel 1"> <Content>Regular sized first panel.</Content> </TileLayoutItem> <TileLayoutItem HeaderText="Panel 2"> <Content>You can put components in the tiles too.</Content> </TileLayoutItem> <TileLayoutItem HeaderText="Panel 3" RowSpan="3"> <Content>This tile is three rows tall.</Content> </TileLayoutItem> <TileLayoutItem HeaderText="Panel 4" RowSpan="2" ColSpan="2"> <Content>This tile is two rows tall and two columns wide</Content> </TileLayoutItem> </TileLayoutItems> </TelerikTileLayout> @code{ async Task OnReorderHandler(TileLayoutReorderEventArgs args) { Console.WriteLine($"tile {args.Id} reordered, might be a good time to save the state."); } }

Yanislav
Telerik team
 answered on 21 Dec 2022
0 answers
77 views

Right now, each tile can be created in each Content and TilelLayoutItem tag. The way my current list works is to use the TileLayout inside of a TelerikListView component using my list as the data. Like this:

 

<TelerikListView Data=@Data
                 Pageable="true"
                 PageSize="int.MaxValue">
                 <Template>



    <TelerikTileLayout Columns="1"
                       Reorderable="true"
                       Resizable="false"
                       RowHeight="180px">


        <TileLayoutItems>
            <TileLayoutItem HeaderText="Descriptors">
                <Content>@context.Description</Content>
            </TileLayoutItem>

        </TileLayoutItems>
    </TelerikTileLayout>
        </Template>
    </TelerikListView>

It shows each item from the list in a new tile as expected, but the problem with this is that since I put it in just one Content/TileLayout tag, each tile somehow counts as one tile, so the Reorderable feature doesn't work. You can test this by adding a another Content tag. The contents of the second tag will only be able to swap with the contents of the first tag, but the contents of the first tag still won't be able to swap with each other. Does the same thing if you use a foreach loop to display the list data as well.

How do I achieve using Tile Layout to display preexisting data/ list items that can reorder? Or how can I reorder the tiles while using a foreach loop?

                                                    
Kezi
Top achievements
Rank 1
 updated question on 15 Dec 2022
1 answer
338 views

Hi,

I'm using Telerik UI for Blazor and I want to use the "alert-danger" bootstrap css class to change the color of a tile item.

I put the css class in the TileLayoutItem (@_cssClass) :

Html result : 

But the color is overrided by the k-card class. I know I could create my custom css class and put !important in it, but I would just copy the same code as in alert-danger class.

I also tried to set the class in the html element I built, but the background color is not "expanding" to all the tiles :

If I put the css class in the div k-tilelayout-item-header and in the div k-tilelayout-item-body, I can have the desired result too, but I didn't find a way to set those in the code.

Is there another way I could acheive the result I want without having to create my own css class ?

Thank you.

 

Marie-Pier
Top achievements
Rank 1
Iron
 answered on 18 Aug 2022
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?