Telerik Forums
UI for Blazor Forum
1 answer
2.0K+ views

Hi there, I'm trying to change the background of toolbar in telerik grid, I know the key is to override the default css, but I couldn't make it. Would you please help me? The font color works well but the background-color doesn't work, even thought I use Bootstrap in the toolbar it still doesn't work. I remove some unnecessary code to make it clean. I also realized it's impossible to do CSS isolation in other components, so I put the css in the global stylesheet.

 

<TelerikGrid Data="GridDataViewModel" Class="addBtn">
    <GridColumns>
        <GridColumn Field="@nameof(ViewModel.Editor)" Editable="false"></GridColumn>
        <GridColumn Field="@nameof(ViewModel.EditTime)" Editable="false"></GridColumn>
        <GridCommandColumn Width="190px">
            <GridCommandButton Command="Save" Icon="save" ShowInEdit="true">Update</GridCommandButton>
        </GridCommandColumn>
    </GridColumns>
    <GridToolBar>
        <GridCommandButton Command="Add" Icon="add" Class="addBtn">Add Branch</GridCommandButton>
    </GridToolBar>
</TelerikGrid>


div.k-toolbar button.k-button-icontext {
    background-color: #4CAF50;
    color: forestgreen
}

.addBtn {
    background-color: #4CAF50;
}

Marin Bratanov
Telerik team
 answered on 05 May 2021
5 answers
680 views

Hi, I'm wondering if there's any way to implement TelerikForm in the Template in TelerikListView? Here's my code below, I have a TelerikListView and I wish to place TelerikForm in its Template without the columns, I only want the feature of form to submit my delete action, after submitting the form, it'll trigger Delete_Click then call another component Confirm, which is a customized confirmation block to avoid deleting without confirmation. However, the context.UserName always showed the last data of context, I tried several times and found out the TelerikListView looped over without entering TelerikForm, is that a feature of TelerikListView or did I do something wrong? Please help me out, thank you in advance.

01.<TelerikListView Data="@Users" Width="800px" Pageable="true">
02.        <HeaderTemplate>
03.            <h2>Users List</h2>
04.        </HeaderTemplate>
05.        <Template Context="context">
06.            <div class="listview-item">
07.                <h4>User Id: @context.Id</h4>
08.                <h4>User Email: @context.Email</h4>
09.            </div>
10.            <TelerikForm Model="context" OnValidSubmit="Delete_Click">
11.                <FormValidation>
12.                    <DataAnnotationsValidator></DataAnnotationsValidator>
13.                </FormValidation>
14.                <FormItems>
15.                    <FormItem>
16.                        <Template>
17.                        </Template>
18.                    </FormItem>
19.                </FormItems>
20.                <FormButtons>
21.                    <TelerikButton class="btn btn-danger" ButtonType="ButtonType.Submit">
22.                        Delete
23.                    </TelerikButton>
24.                </FormButtons>
25.            </TelerikForm>
26.            <Confirm @ref="DeleteConfirmation" ConfirmationChanged="ConfirmationDelete_Click"
27.                     ConfirmationMessage=@($"Are you sure you want to delete \"{context.UserName}\"?")></Confirm>
28.        </Template>
29.    </TelerikListView>
Jeff
Top achievements
Rank 2
Iron
 answered on 05 May 2021
1 answer
851 views

THanks ... Ed

 

Marin Bratanov
Telerik team
 answered on 04 May 2021
6 answers
1.2K+ views
How can I change the datepicker format in filter row?
Marin Bratanov
Telerik team
 updated answer on 02 May 2021
7 answers
1.2K+ views

Hi,

I have a grid with StartTime column, the source object for the grid has a property DateTime

I can handle this using Template and format the output of the DateTime, showing time only

<GridColumn Field=@nameof(DtoRead.Shift.EndTime) Title="@LanguageContainer.Keys["MasterDataEndTime"]" Editable="false" Width="@ColumnSize.S">
    <Template>
        @((context as DtoRead.Shift).EndTime?.ToString(@"hh\:mm", System.Globalization.CultureInfo.CurrentCulture))
    </Template>
</GridColumn>

 

when Grid is loaded with data, I have filter on top of this column and it shows DatePicker control

I want to show a Time Picker instead... how to do this?

I want to see time only and filter time only values

 

Thanks,

Artem

 

 

Marin Bratanov
Telerik team
 answered on 02 May 2021
1 answer
497 views

I have a simple combobox where the value is not populated on load:

<TelerikComboBox Value="@SelectedValue"
                 Data="@SourceColumns"
                 AllowCustom="true"
                 Width="100%" />

 

@SelecteValue is a string

@SourceColumns is an ObservableCollection<String>

If I switch it to a drop down list, the item is selected, however I need to be able to have custom values.

This seems pretty straight forward, and I am thinking I am missing something minor?

 

Marin Bratanov
Telerik team
 answered on 01 May 2021
1 answer
432 views
In Telerik blazor grid  Incell editing mode once we edit existing grid row and modified and save.  after that how to add new row programmatically (automatically like excel).  no need to bother user to  click add button again and again. 
Marin Bratanov
Telerik team
 answered on 01 May 2021
1 answer
898 views
I am trying to use the data grid for mapping a source to a destination.  I would like to have a grid toolbar command that puts all rows in edit mode and then while in edit mode either disable or hide the button.  Is this feasible if so, any guidance on how to do this?
Marin Bratanov
Telerik team
 answered on 30 Apr 2021
1 answer
181 views
I'd like to have my own button invoke the GridColumnMenu... can this be done?
Marin Bratanov
Telerik team
 answered on 30 Apr 2021
8 answers
1.3K+ views

I have a scrollable page that includes logic to show a Telerik window control.  I have the window height set by default to 600px and I have included the default maximize action.  The content of the Window may or may not be scrollable as well.

When I maximize the window control it fills the entire scrollable area rather than just the current visible area.

Any thoughts on what I might be doing wrong or if this is how the control is supposed to work?

Thanks,

Greg

Marin Bratanov
Telerik team
 answered on 30 Apr 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?