Telerik Forums
UI for Blazor Forum
1 answer
358 views

I have rearranged the row/col split in multiple ways. It seems no matter what I do the horizontal scrollbar always shows up. This only happens when the tabstrip has a "row/col" boostrap within it. If I don't put the row/col and just put a straight grid it properly doesn't not have a horizontal scrollbar. I even set the display initializer to wait until after the parameters have been set in the component. I tried the Kendo UI approach to force the tabstrip to not display the horizontal scrollbar, but I cannot seem to add an Id to the tabstrip.

Horizontal Scrollbar Issue

Grid Same Window Without Scrollbar

 

html_code_example

Nadezhda Tacheva
Telerik team
 answered on 07 May 2021
2 answers
1.5K+ views

Hi,

I am using the CSLA framework with Blazor WebAssembly and am trying to send the Telerik.DataSource.DataSourceRequest from the Blazor Client using a Telerik Blazor Grid through to the CSLA DataPortal API endpoint on the Blazor Server.

Unfortunately the CSLA framework is unable to successfully serialize and de-serialize the Telerik.DataSource.DataSourceRequest object as is. 

I tried creating a CSLA compatible wrapper so that i could use the built-in CSLA serialization, unfortunately i have hit an issue in the fact that CSLA only supports serialization of primative types (int, float, string, datetime, etc).

My discussion (https://github.com/MarimerLLC/csla/discussions/2268) on the CSLA repo suggests that I may need to serialize to a string or byte[] array.

The option I'm left with is to manually serialize the entire Telerik.DataSource.DataSourceRequest object as either a string or byte[] array by using either System.Text.Json or Newtonsoft.Json.

Then when the string or byte[] array is received by the CSLA DataPortal API endpoint I can manually de-serialize the parameter as a Telerik.DataSource.DataSourceRequest object.

Looking at the Telerik docs it appears that the Telerik.DataSource.DataSourceRequest object supports System.Text.Json out of the box but if I want to use Newtonsoft.Json then i might have to do some custom serialization, therefore my preference would be to use System.Text.Json.

How can I use System.Text.Json to serialize and de-serialize the Telerik.DataSource.DataSourceRequest object manually as my mode of transport to the CSLA DataPortal API endpoint doesn't use the native Blazor System.Text.Json serializer?

Adrian
Top achievements
Rank 1
Iron
Veteran
Iron
 answered on 06 May 2021
0 answers
243 views

Hello. I have added a pie chart to my initial page (attached code sample and output).  The pie chart is skewed to the right side of the page rather than being centered. How can I center it?  

I've tried putting it in a row and column object but it just skews it right within those.

Thanks,

Debra

Debra
Top achievements
Rank 1
Iron
 asked on 05 May 2021
1 answer
481 views

I'm using TelerikComboBox and came across a problem that when I select a value from the drop-down list and the value changes, the method is not called. 

 

<TelerikComboBox Data="@SuggestedEmployees" 
                                 TItem="@CompanyEmployeeDropDownInfoModel"
                                 TValue="string"
                                 TextField="Email"
                                 ValueField="Email"
                                 Placeholder="E-mail"
                                 ClearButton="true"
                                 Filterable="true"
                                 Width="100%"
                                 OnRead="@(OnEmailChanged)" 
                                 @bind-Value="@Email"
                                 AllowCustom="true" >
                    <ItemTemplate Context="newContext">
                        <strong>@((newContext as CompanyEmployeeDropDownInfoModel).FirstName) @((newContext as CompanyEmployeeDropDownInfoModel).LastName) @((newContext as CompanyEmployeeDropDownInfoModel).PhoneNumber)</strong>
                    </ItemTemplate>
                </TelerikComboBox>

 

 

At first, SuggestedEmployees is empty. When user inputs more than 3 symbols, we get list of employees and show it to user. Everything works fine, when user manually input symbols, but when user select target employee from list and email changes, nothing happened, OnRead method doesn't trigger.  Any suggestion?


Marin Bratanov
Telerik team
 answered on 05 May 2021
1 answer
1.9K+ 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
668 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
814 views

THanks ... Ed

 

Marin Bratanov
Telerik team
 answered on 04 May 2021
6 answers
1.1K+ views
How can I change the datepicker format in filter row?
Marin Bratanov
Telerik team
 updated answer on 02 May 2021
7 answers
1.1K+ 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
473 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
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?