Telerik Forums
UI for Blazor Forum
0 answers
25 views

Issue Description: I'm encountering challenges with dynamically positioning the command column within the Telerik Blazor DataGrid while using a single grid component for two pages. Each page utilizes the same grid component but may have different sets of columns generated dynamically. Despite this setup, I'm unable to ensure that the command column consistently appears at the last position in the grid on both pages.

Background: In my application, I've implemented Telerik Blazor's DataGrid component to display tabular data across multiple pages. To streamline development and improve code maintainability, I've opted to use a single grid component shared between two pages. Each page may have a different set of columns generated dynamically based on the specific requirements of the page. Additionally, the data source for the grid is an ExpandoObject, and I'm using a loop to dynamically generate columns.

Current Approach: My current approach involves dynamically generating columns using a loop for each page's specific requirements. However, due to the shared nature of the grid component and the dynamic nature of the data source, I'm experiencing difficulties in ensuring that the command column, which contains actions like edit, delete, etc., is consistently positioned at the last column on both pages.

Expected Behavior: I expect to have precise control over the position of the command column within the DataGrid, even when using a single grid component shared between two pages and dynamically generating columns with ExpandoObject as the data source. Regardless of the page being accessed, the command column should always appear at the last position in the grid, providing users with a consistent interface for interacting with the data.

Request for Assistance: I'm seeking assistance from the Telerik community for guidance, insights, or potential workarounds on how to achieve the desired behavior of positioning the command column as the last column in the DataGrid consistently across two pages, even when utilizing a shared grid component and dynamically generating columns with ExpandoObject as the data source.

Any assistance or suggestions would be highly appreciated. Thank you for your support!

1 answer
200 views
I've been weighing using the toolbar vs. the menu. I like that the menu allows for easy hierarchies, but the toolbar seems to be the way to go for including other elements like the checkbox. Any thoughts?
Dimo
Telerik team
 answered on 28 Apr 2023
1 answer
165 views

I was trying to create a toolbar that had some buttons alligned on the end (right side) of the toolbar and also using the new Adaptive flag (to also have overflow items) and it seems that the spacer element does not take into account the size of the overflow button at the end.

I had to enter an empty label element at the end of the toolbar content elements to get enough empty space for the overflow button not to overlap with the last toolbar button

        <ToolBarTemplateItem>
            <label style="width:30px;"></label>
        </ToolBarTemplateItem>

Is there a better solution or is this a bug that will be addressed in a future release?

Joana
Telerik team
 answered on 06 May 2022
1 answer
60 views

We recently made the update from version 2.* to 3.1.0 and then 3.2.0. I'm unsure when and where the change occurred but we are now having problems with the items visual display.

Previously, we had 2 ToolBarTemplateItem's setup like so:


<TelerikToolBar Class="toolbar-size">

                        <ToolBarTemplateItem>
                            <TelerikMultiSelect 
                                    Class="font-size-12 ml-5 bg-light-transparent h-auto"
                                    Data="@Data"     
                                    Value="@ChosenModelNames"
                                    TextField="@nameof(TreeView.Text)"
                                    ValueField="@nameof(TreeView.Id)"
                                    Placeholder="Select Data"
                                    ValueChanged="@((List<string> args) => ChosenModelsChanged(args))"
                                    Width="auto"
                                    ItemHeight="25"
                                    FillMode="@ThemeConstants.DropDownList.FillMode.Outline"
                                    Rounded="@ThemeConstants.DropDownList.Rounded.Small"
                                    Size="@ThemeConstants.DropDownList.Size.Large"
                                    >
                                    <ItemTemplate>
                                        @{
                                            var ctx = context as TreeView;
                                        }
                                        @ctx.DisplayName @ctx.Name
                                    </ItemTemplate>
                            </TelerikMultiSelect>
                        </ToolBarTemplateItem>

                        <ToolBarTemplateItem>
                            <div class="mt-4 ml-2 w-100">
                            <TelerikRangeSlider 
                                    @bind-StartValue="@StartValue"
                                    @bind-EndValue="@EndValue"
                                    Min="0"
                                    Max="25"
                                    SmallStep="@SmallStep"
                                    LargeStep="@LargeStep"
                                    Width="95%" 
                                    OnChange="@(args => TimeUpdateHandler())"
                                    TickPosition="@SliderTickPosition.Before">
                                    <LabelTemplate>
                                        <div class="time-slider-text">
                                            @(GetRangeDate(context).ToString("htt"))
                                        </div>
                                </LabelTemplate>
                            </TelerikRangeSlider>
                            </div>

                        </ToolBarTemplateItem>

                    </TelerikToolBar>
This now adds div elements to the dom that I don't believe were there before. I then attempted to use <ToolBarTemplateItem Class="myClass"> but the class doesn't actually go into that div or anywhere else that I can see.
Hristian Stefanov
Telerik team
 answered on 26 Apr 2022
1 answer
55 views

Unlink TelerikButton's, ToolbarButton's do not have a ThemeColor, so cannot change their colour like you could a normal button.

This is really an issue as of 3.0.0, not before I should note.

Nadezhda Tacheva
Telerik team
 answered on 02 Feb 2022
1 answer
248 views
Inside the grid toolbar I have a mix of components: dropdownlist, command buttons and toogle buttons in a toggle button group.
Everything works fine, the problem is that the vertical alignment of the dropdown lists and the toggle button group is different from that of the command buttons (see attached image).
I tried different styles or wrapping everything in a div and setting the styles but have not been successful.
Could you tell me that I should modify in order to get the buttons vertically aligned?

Thanks.
Blazorist
Top achievements
Rank 2
Bronze
Iron
Iron
 answered on 17 Jun 2021
3 answers
1.1K+ views

Hi,

the labels 'Start' and 'End' of the TelerikDateRangePicker are shown over the input controls.

Example Razor page:

@page "/Testsupport1"
 
<TelerikToolBar>
    <ToolBarTemplateItem><label for="cbId">Label1</label></ToolBarTemplateItem>
    <ToolBarTemplateItem>
        <TelerikComboBox TItem="string" TValue="string" Width="80px" Id="cbId" />
    </ToolBarTemplateItem>
    <ToolBarButton Icon="refresh">Refresh</ToolBarButton>
    <ToolBarTemplateItem>
        <label for="ddlId">Label2</label>
    </ToolBarTemplateItem>
    <ToolBarTemplateItem>
        <TelerikDropDownList TItem="string" TValue="string" Id="ddlId" Width="80px"/>
    </ToolBarTemplateItem>
    <ToolBarTemplateItem>
        <TelerikDateRangePicker T="DateTime" />
    </ToolBarTemplateItem>
</TelerikToolBar>

 

Image:https://imgur.com/S0fiwRq

How can I adjust the position of labels and controls?

It is ok to show the labels above, but then for all controls.

Or how can I modify TelerikDateRangePicker to use one line and show the labels before the controls.

Best Regards,

Peter

 

 

Svetoslav Dimitrov
Telerik team
 answered on 03 Dec 2020
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?